I use migrations, it is only marginally better than solving the problem myself. On my personal projects, migrations work beautifully. At my work, um, not so much.
Here are some of the issues we run into with our smallish dev team, 4 full time rails developers:
We do some sort of agile development, and during the course of each iteration we end up with about 10 migrations. That’s like 1 a day! Seems like too many to me, at least. This would likely be 30 per iteration, except that we allow our team to modify migrations, until they are released to production. This is not really a problem with migrations more of a problem with fast/frequent refactoring (which is a good thing). The only way to solve this is to do better upfront design, which is kinda counter to the way we develop.
When you test your migrations it is important to do so with **cache\_classes** set to **true**. Why is this important you might ask? Well basically if you add a column to your schema, then try to assign data to that column, issues will arise. It will work in development mode, but when you try to go to production, it will run, it will complete, but the data you tried to set won’t be there. This seems weird. I think there should be a config parameter that would disable Class caching in migrations. Honestly, I don’t care how fast my migrations run (within reason) as long as they do what they claim they are doing.
Loading lots of lookup data into production is not that easy to do. It would be nice to say here is a csv, rails generate that data. You can do it, but if you use their built in stuff you can only populate 1 table per csv file. Not a problem unless you have foreign keys that need to reference stuff in a different table. Blah, it sucks. Alternatively you could define and parse your own file that spanned tables, but that *is* work, and if it takes over 20 minutes to do in rails it’s not worth doing.
Sometimes we end up needing to add a migration on a branch. Since migrations are sequential, this poses a problem. I don’t think this is surprising, or unsolvable, I even think the [other people](http://revolutiononrails.blogspot.com/2007/02/plugin-release-enhanced-rails.html “Revolution On Rails: [PLUGIN RELEASE] Enhanced Rails Migrations v1.1.0″) have taken a crack at it. Just a minor annoyance from time to time.
Like I said at the top of the post, I use migrations. I don’t want to solve the problem again, but I think there are a lot of change that could be made.
I should also note that the company I work at, a super fun startup, is looking to hire one developer. There are a few requirements, must be willing to live in the DC area, and must be willing to learn Ruby. The people are cool, the environment is casual and your input into building a product is valued. Anyway if you want more info drop me a line, schlueter at gmail [dot] com.