undo latest migration code example
Example 1: rails rollback multiple migrations
rake db:rollback STEP=n
# n = how many migrations you want to rollback
Example 2: rails redo last migration
rake db:migrate:redo STEP=n
rake db:rollback STEP=n
# n = how many migrations you want to rollback
rake db:migrate:redo STEP=n