I've deleted a table in the database, call it X. db:migrate no longer works. I have a migration file called CreateX. Is there a way to run just that specific migration?
A:
Already answered: http://stackoverflow.com/questions/753919/run-a-single-migration-file
Daniel
2009-08-22 19:56:50
+3
A:
rake db:migrate:redo VERSION=my_version
Or you can go up or down from a specific version:
db:migrate:up VERSION=my_version
db:migrate:down VERSION=my_version
Joseph Silvashy
2009-08-22 19:57:04
rake db:migrate:redo seems to work for me (db:specific:redo just gives an error, I'm imagining a version issue)
Daniel
2009-08-22 20:01:33
Oops yah, you were right, that was my custom rake task mixed in, but I fixed it those should work well now.
Joseph Silvashy
2009-08-22 20:03:12
Thanks for the help!
Daniel
2009-08-22 20:18:49