Reputation: 169
I have a nodejs server and I'm writing some migrations. For some reason my script is not recognizing the desired name for the migration: this is my script:
"create-migrate": "migrate-mongo create $NAME"
This is supposed to let me use something like :
npm run create-migrate init-data
and create a migration named "init-data".
What happens - it's just creating the migration using the "$NAME" as the name... I'm not sure if it has something to do with me working on windows or not, anyway I will be thankful for some light here.
Upvotes: 0
Views: 318
Reputation: 85
Actually you don't need the $NAME
argument
just use like this
"create-migrate": "migrate-mongo create"
and what ever you pass after create-migrate
will become it name
example
npm run create-migrate init-data
Upvotes: 1