Doctrine Migrations Re. Fixtures

I'm thinking about deploying Doctrine migrations in my environment to handle database changes between multiple developers. I haven't used them before, but I have done my research on the matter.

My only concern at this point is that [as far as I can tell] Doctrine migrations don't allow for fixture modifications. While I realize that migrations are for schematic changes, I think fixture changes are just as important.

I would like to have fixtures for the reference tables is my database (ie *_type, *_source, etc), and I feel that row add/delete/updates should be handled by these migrations as well, as they are just as important as any structural change.

If anybody could point me in the right direction here, it would be much appreciated.


I explored the idea of simply letting SVN track my reference table fixtures, but this would be be an undeployable solution. The tables would not be able to be truncated/re-populated due to foreign key constraints.


As you pointed out, migrations are to facilitate structural changes to the database, not for manipulating your fixture data in line with them.

In my experience, using migrations when an application is in development is not necessarily the most helpful way to do it, especially if Developer A creates a new migration and doesn't commit immediately, and Developer B also creates a new migration that (unknowingly) conflicts with Developer A's migration, and then checks in immediately. Developer A checks his (or her) migration soon after, and you have two conflicting migrations and the world explodes.

I'd say the better (albeit more longwinded) way to do it would be to make your schema changes in schema.yml, apply your schema changes (either with a private migration or manually) and then doctrine:data-dump and commit your fixture data.

If you do opt for migrations in development, perhaps you should consider using the ->postUp() and ->preUp() methods of the Doctrine Migration class to transform your data in situ.

Need Your Help

Atomic Operations in C on Linux

c linux gcc atomic

I am trying to port some code I wrote from Mac OS X to Linux and am struggling to find a suitable replacement for the OSX only OSAtomic.h. I found the gcc __sync* family, but I am not sure it will be

Sub Report or CustomReportItem to display complex data using SSRS?

reporting-services ssrs-2008 subreports

Each record in my report includes (amongst other information) a set of other data items of the format "ItemName X Y Z" where X, Y & Z are numerical values.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.