I\'m running Rails 3.0.3 and I accidentally made a typo in my migration: I created a migration that creates a new column with a type of boolen
(it should have b
I had the same issue, because instead "$rails generate migration add_reset_to_users reset_digest:string \
reset_sent_at:datetime" I miss typed "$rails generate migration add_reset_to_users reset_digest:string\ reset_sent_at:datetime". I first removed the "reset" migration using DB browser for SQLite, then I checked schema.rb file, in that instead of " t.string "reset_digest" " it was " t. "reset_digest" ". I edited it to "t.string" then rails db:migrate VERSION="previous one" and it worked. Now my latest migration is down. I deleted my previous migration file and then executed "$rails generate migration add_reset_to_users reset_digest:string reset_sent_at:datetime", I got the migration file as I wanted now.
You can also fix the database using a database tool. I had the same problem and used the great application "Base" for MacOS X. It allows you to change the field type of sqlite databases.
In the background it just creates a new table with the modified fields and copies the data from the original one. Worked for me!
If you face the same issue on rollback again, try to remove the faulty column in the database manually. (There is a nice Firefox plugin called SQLite Manager.)
Then run the rollback command, fix the issue in the migration file, and finally migrate again. This will help you stay in the constraints of Rails migration.