You can rollback and then migrate again using the redo
command. This is basically a shortcut that combines rollback
and migrate
tasks.
Run command:
rake db:migrate:redo
rails db:migrate:redo
You can use the STEP
parameter to go back more than one version.
For example, to go back 3 migrations:
rake db:migrate:redo STEP=3
rails db:migrate:redo STEP=3