afloyd / mongo-migrate

MIT License
159 stars 81 forks source link

Migration method "run()", pass revision number #71

Open SiriusED opened 6 years ago

SiriusED commented 6 years ago

Hi, I use mongo-migrate inside of grunt task like this:

let mm = require('mongodb-migrate')

mm.setDbConfig(JSON.stringify(mmConfig));
mm.run("up");

Can I pass revision number to this method like?

mm.setDbConfig(JSON.stringify(mmConfig));
mm.run("up", 10);

Or which other way can I get exect result as using this command from console?

node ./node_modules/mongodb-migrate -runmm down 10

What does migrationEnd mean function runMongoMigrate(direction, migrationEnd, next)?

Not relevant, have found mistake it was on my side.