Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration file not created (yarn) #62

Open
yojeek opened this issue Oct 2, 2018 · 2 comments
Open

Migration file not created (yarn) #62

yojeek opened this issue Oct 2, 2018 · 2 comments

Comments

@yojeek
Copy link

yojeek commented Oct 2, 2018

I have following script in my package.json

"scripts": {
     // ...
    "migrate": "mm --config=config/migration.js"
  },

Config :

module.exports = {
  url: 'mongodb://localhost/some',
  directory: 'migrations'
}

After I run create command no migration file being created :

$ yarn migrate create SOME
yarn run v1.9.4
$ mm --config=config/migration.js create SOME
the server/replset/mongos options are deprecated, all their options are supported at the top level of the options object [poolSize,ssl,sslValidate,sslCA,sslCert,ciphers,ecdhCurve,sslKey,sslPass,sslCRL,autoReconnect,noDelay,keepAlive,connectTimeoutMS,family,socketTimeoutMS,reconnectTries,reconnectInterval,ha,haInterval,replicaSet,secondaryAcceptableLatencyMS,acceptableLatencyMS,connectWithNoPrimary,authSource,w,wtimeout,j,forceServerObjectId,serializeFunctions,ignoreUndefined,raw,bufferMaxEntries,readPreference,pkFactory,promiseLibrary,readConcern,maxStalenessSeconds,loggerLevel,logger,promoteValues,promoteBuffers,promoteLongs,domainsEnabled,keepAliveInitialDelay,checkServerIdentity,validateOptions,appname,auth]
✨ Done in 0.93s.

@yojeek
Copy link
Author

yojeek commented Oct 2, 2018

Looks like order of parameters passed to CLI interface matters (it shouldn't imo)

This works :

yarn mm create SOME --config=config/migration.js

While this doesn't (runs migration instead) :

yarn mm --config=config/migration.js create SOME

@KieronWiltshire
Copy link

KieronWiltshire commented Dec 2, 2018

Well how can we fix this? because thats an issue for me.

EDIT:
https://github.com/KieronWiltshire/node-mogront

I made that instead :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants