views:

316

answers:

2

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?

+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
rake db:migrate:redo seems to work for me (db:specific:redo just gives an error, I'm imagining a version issue)
Daniel
Oops yah, you were right, that was my custom rake task mixed in, but I fixed it those should work well now.
Joseph Silvashy
Thanks for the help!
Daniel