rails rollback until code example
Example 1: rials db down
bin/rails db:migrate:down VERSION=YYYYMMDDHHMMSS
Example 2: rails db:rollback
rake db:rollback VERSION=n
# n = the version you want to rollback to
bin/rails db:migrate:down VERSION=YYYYMMDDHHMMSS
rake db:rollback VERSION=n
# n = the version you want to rollback to