Cli: Specify specific migration in db:migrate:undo

Created on 2 Sep 2016  路  5Comments  路  Source: sequelize/cli

Umzug provides options for specifying which migration to down: https://github.com/sequelize/umzug#reverting-executed-migration

I'd like to be able to specify, at least, the name of the migration I'd like to undo.

I imagine a feature like this might be useful for up, as well.

Any support for adding such a feature?

Most helpful comment

db:migrate:undo --name 20180704124934-create-branch.js
this will work only if you don't have relation between your model with other models.

All 5 comments

+1

db:migrate:undo --name 20180704124934-create-branch.js
this will work only if you don't have relation between your model with other models.

@patil-gaurav but this one just revert the last migration and it's not gonna any effect to the specific migration.

db:migrate:undo --name 20180704124934-create-branch.js
this will work only if you don't have relation between your model with other models.

Thanks you so much @patil-gaurav
It worked to me very well!

Was this page helpful?
0 / 5 - 0 ratings