Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Rollback Migration] #migration #database #rails #ruby
rails db:rollback STEP=1
# Is a way to do this, if the migration you want to rollback is the last one applied. You can substitute 1 for however many migrations you want to go back.
# For example:
rails db:rollback STEP=5
# Will also rollback all the migration that happened later (4, 3, 2 and also 1).
# In order to rollback a specific migration use:
rails db:migrate:down VERSION=20100905201547
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.