Rollback migrations
suggest changeTo rollback the latest migration, either by reverting the change method or by running the down method. Run command:
rake db:rollback
rails db:rollback
Rollback the last 3 migrations
rake db:rollback STEP=3
rails db:rollback STEP=3
STEP provide the number of 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