After adding migration files in the db/migrate folder and running rake db:migrate, I want get back to the previous step, I think using VERSION=n is the right way to do that, but I don’t know the correct value of n to use. Is there any command to check the current n value?
It would be great if anyone could provide full instructions on how to use rake db:migrate.
For starters
rake db:rollbackwill get you back one stepthen
rake db:rollback STEP=nWill roll you back
nmigrations wherenis the number of recent migrations you want to rollback.More references here.