Pergunta

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!

Foi útil?

Solução

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

Outras dicas

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top