Possible to force a migration from the command line?
I made a rookie mistake with a migration yesterday. I amended a migration that had already been uploaded and run, and I forgot to rollback before uploading the new version. Now, the migration is failing because either a column already exists (up) 开发者_StackOverflow中文版or there is no column to delete (down)!
Is it possible to get a migration to force its changes one time from the console, without having to write :force => true
within the document first, migrating, and then removing it again?
A simple way of getting back to a stable state would be to make a manual change in the database adding the column so that the rollback works, and then do the rollback and migrate up again.
精彩评论