rails no migration with version number 1

rails no migration with version number

rake db:migrate:status 
# returns something like
# up 20200424185017 migration name
# up 20200507195924 ********** NO FILE **********

rake db:migrate:down VERSION=x
# x = version number you want to migrate to, in this case it would probably be 20200424185017 

Here is what the above code is Doing:
1. It’s checking the status of your migrations.
2. It’s finding the version number of the migration you want to roll back to.
3. It’s rolling back to that version.

Similar Posts