for pretty migrations, just add yagni

There has been a bit of discussion on the Rails Core mailing list around the new UTC-timestamped migrations.

The gist of it is:

  • The new migration style is ugly, but it works
  • All other suggested approaches are not worth the trouble
  • We should all be worrying about more important things…

Okay, so my patch isn’t going to make it in to edge Rails.

I actually think that’s pretty cool. Rails is opinionated – that’s a big part of its appeal. So I’m glad the core team are polite but firm – thanks, but no thanks.

The other awesome thing is that Ruby makes it so that, well, your opinion can differ. And I really hate having to call across the room “Hey Ollie, check out that migration 20080705…. whatever”. And I also like the way UTC migrations fix the branching duplicate-migration-version problem. So I wrote a YAGNI migrations plugin.

It only works on Edge rails (because of the new preference), and it comes with absolutely no warranty, but it should make life that little bit more bearable for pedants like me.


what other people thought

Just in case you’re worried about wasting effort, this patch did come out of the time I spent in migration-land ;)

Nik, August 2nd, 2008 at 7:46 pm

have your say