Reputation: 19247
My Rails 3.0 app has three new migrations pending, X and Y and Z, but some manual intervention is required after running X and before running Y and Z.
Is there a way to tell rake "run anything pending up to and including X" (then do my manual stuff)?
After that manual cleanup of course I can just run the normal rake db:migrate and it'll catch up with the rest.
(In the future, if we clone and rebuild the app from scratch someday it is not a problem to run them all at once. It's a a matter of one-time massaging the legacy data between those two migrations.)
Upvotes: 1
Views: 434
Reputation: 1356
rake db:migrate:up VERSION=X
# do your stuff
rake db:migrate
Source: Migrations-Guide
Upvotes: 2