Pratik suggested I send an email to this list to discuss making timestamped migrations optional. I have submitted a ticket which includes a patch. I am a bit confused why the ticket was marked as incomplete as the solution seems rather simple. IMHO, making this optional would have saved the effort of removing code.
So, here’s my take:
From a single developer/small team perspective timestamped migrations were unnecessarily added as the standard format. The problem addressed by introducing timestamped migrations is a communication issue that doesn’t apply to everyone using Rails. I disagree with making timestamped migrations mandatory instead of optional. I also think the default should be the original numbering scheme due to legacy applications, not timestamps as Pratik says in the ticket. If people really wanted timestamped migrations, they could have added the plugin.
It’s the small things that annoy, here are a few examples:
- I use Terminal a lot and sometimes copy a migration to start a new one. The timestamp numbering makes this a pain.
- I have a project, Lockdown, that generates 5 migrations. I had to modify the next_migration_string method to add a sleep(1) call to prevent all migrations from having the same number. Big deal right? Well, timestamped migrations forced me to update Lockdown just because of this change.
- My “old” 2.0.2 app that had a bunch of migrations were now mixed with timestamped migrations. My migrations are no longer ordered in my file view.
There are other minor issues, but don’t think there’s a need to get that picky, this should be example enough.
In the future, should I submit a ticket first or just post something to this list?
Thanks for all the work, Rails saved me from the Java world.
I hope timestamped migrations are made optional in the next release of Rails, but if not, I have a way around it. I’m writing this for other Rails users more than myself.