Open veeramarni opened 4 years ago
Is your feature request related to a problem? Please describe.
Instead of passing migration definition as file, if we can provide that as object like below will be very helpful.
Describe the solution you'd like A clear and concise description of what you want to happen.
var migrationDef = { id: "RenameProperty", up: function (done) { var coll = this.db.collection("GeneralSettings"); coll.updateMany({}, {$rename: {"nmae": "name"}}, done); }, down: function (done) { var coll = this.db.collection("GeneralSettings"); coll.updateMany({}, {$rename: {"name": "nmae"}}, done); } }; migrator.add(migrationDef); migrator.rollback(function (error, results) { if (error) console.error(error); migrator.dispose(function () { console.log("DISCONNECTED!"); }); console.log(results); });
Is your feature request related to a problem? Please describe.
Instead of passing migration definition as file, if we can provide that as object like below will be very helpful.
Describe the solution you'd like A clear and concise description of what you want to happen.