Created
December 9, 2018 09:49
-
-
Save mediter/47acf25da8e9fe6f1b244069e854c05b to your computer and use it in GitHub Desktop.
[Rollback Migration] #migration #database #rails #ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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