Rollback migrations
suggest changeRoll back the latest migration. Rails reverses the change method, or runs down when that is what the migration defines.
rake db:rollback
rails db:rollback
Rollback the last 3 migrations
rake db:rollback STEP=3
rails db:rollback STEP=3
STEP is how many migrations to revert.
Rollback all migrations
rake db:rollback VERSION=0
rails db:rollback VERSION=0
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents