hello i'm trying to use the command migrate-mongo up
in only one file but if i use the command migrate-mongo up
the command will up all the migrations files in pending , i need to select a specific file not all the files at the same time for example
migrate-mongo up 20160608155948-blacklist_the_beatles.js
this command is unknown command
i'm using this librery
https://github.com/seppevs/migrate-mongo#readme
CodePudding user response:
migrate-mongo
automatically runs on all migrations in the directory that have not been run. There are no options to change this behavior. Not knowing the use case here, you could potentially make a new migrations directory, or simply move the migrations you don't want to run out of the migrations directory.
If this is just a one-off use case, I'd recommend moving the migrations you don't need out of the directory, running up
then moving them back. If this will be a persistent problem, I'd reconsider if migrations are really the right tool for the job, given that they are assumed to be run once, and in order.