Timestamped Migrations Status
As I have reported on the rubyonrails-core mailing list, I have a working solution. Right now, this is a patch against Rails Edge. I am trying to move this code into a plugin, but I have problems with dependencies. I override methods in Rails::Generator::Base, but there is no file named rails/generator/base.rb. That constant is defined in rails_generator/commands.rb, which makes it very hard for the ActiveSupport dependency mechanism to load it.
In the hopes that someone could show me the way, I am making the patch available through the Rails Trac on issue #6838. The patch is timestamped_migrations.v1.patch
What this patch does:
- Generates migrations where the version number is replaced with a UTC timestamp;
- Allows migrating up and down, ordering migrations by name;
- Records which migrations were run in the
schema_migrationstable.
This patch has no tests, but from the command line it seems to work. It even works with the db:sessions:create Rake task.
Enjoy, and either leave comments here or at francois.beausoleil@gmail.com.
2006-12-13 Update: Opened a new ticket as #6838, from #6799.