We all know the good old
rake db:migrateAnd we all know the Rails 2.x
rake db:migrate:rollbackto go back in time and fix what we did.
Now, in Rails 2.x you can specify a single migration by specifing one of the each
rake db:migrate:up VERSION=<migration_timestamp> # Runs the self.up rake db:migrate:down VERSION=<migration_timestamp> # Runs the self.downNote that migrations are meant to be concurrent and that's the most basic purpose in which they are there for, executing an out of line migration may cause you problems in the future, so try to stay as clean as possible when dealing with migrations
2 comments:
January 21, 2009 at 4:26 AM
nice!
you just solved me an ancient problem!
thanks.
January 21, 2009 at 8:51 AM
NP.
I am always up to some old-school quirks :)
Post a Comment