Migration file not created (yarn)
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.
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
Well how can we fix this? because thats an issue for me.
EDIT: https://github.com/KieronWiltshire/node-mogront
I made that instead :P