Run specific migration
suggest changeTo run a specific migration up or down, use db:migrate:up or db:migrate:down.
Up a specific migration:
rake db:migrate:up VERSION=20090408054555
rails db:migrate:up VERSION=20090408054555
Down a specific migration:
rake db:migrate:down VERSION=20090408054555
rails db:migrate:down VERSION=20090408054555
The version number is the numeric prefix in the filename. For 20160515085959_add_name_to_users.rb, pass 20160515085959. db:migrate:up and db:migrate:down run that one migration. They do not run every migration up to that version. rails db:migrate VERSION=... does.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents