Saturday, May 31, 2008
Migration: Change the file name fix the pain?
So I'm watching the keynote by Jeremy Kepler and he had struggles... everyone does... with rails migrations. Sadly the big answer to our woes with migrations was changing the identifier on the front of the file name from a incrementing integer to a time stamp. Well I'm not going to dog on the change because I've thought it was obvious and needed, but why in the world are we putting that time stamp at the front of the file? We name our migrations for a reason and perhaps it's just my love of the command line but I want to use what I've named it instead of trying to get the time stamp associated with a migration before hitting tab. So we could argue about storing the names in the database table for migrations and all that jazz, but its such a simple patch to put the time stamp at the end of the file. Well that's what I'll do. With arguably the nicest string manipulation methods in any standard library I think I can pull off the ever complicated reverse! method I'll have to use to do it.