Is it possible to run only the next migration file with the sequelize-cli?
I have been looking through the docs and help-section of the cli, and it does not appear to be such a feature.
For instance, I have the following when running the sequelize db:migrate:status
command;
Loaded configuration file "config/config.js".
Using environment "development".
up 20170301090141-create-something.js
up 20170301133113-create-else.js
up 20170301133821-Update-some-stuff.js
up 20170301135339-create-some-model.js
up 20170307152706-update-some-stuff-two.js
down 20170316142544-create-an-index.js
down 20170421112638-do-some-refactor.js
I would like to only run the 20170316142544-create-an-index.js
.
Of course, I can remove all the relevant files. Then I add each migration back one-by-one, running "all" migrations between each one. But this seems so barbaric.
sequelize:migrate
command, sequelize will only run the migrations that are still pending (i.e the one that were never run before). To keep track of what was run, sequelize uses a table in the database. However, there isnt a way to run just a specific migration file. – Kishakishinev--migrations-path
to thesequelize db:migrate
command – Kishakishinev