rollback migration rails code example
Example 1: rails rollback multiple migrations
rake db:rollback STEP=n
# n = how many migrations you want to rollback
Example 2: rails revert migration
rake db:rollback
Example 3: rails redo last migration
rake db:migrate:redo STEP=n
Example 4: rails db:rollback
rake db:rollback VERSION=n
# n = the version you want to rollback to