Question

I want to know if there is a short way to do the migrations down equivalent to rake db:migrate (for the migrations up). Instead of doing : rake db:migrate:up VERSION=1, rake db:migrate:up VERSION=2, ... we can do : rake db:migrate! But for : rake db:migrate:down VERSION=10, rake db:migrate:down VERSION=..., rake db:migrate:down VERSION=1, is there a shortcut?

Tank you for your help!

Was it helpful?

Solution

rake db:migrate VERSION=0 will remove all migrations, if that's what you're trying to do.

OTHER TIPS

I don't think there is a premade task for doing what you want. You can see all of the available rake tasks using rake -T.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top