Releases: malykhinvi/node-mongodb-changelog
Releases · malykhinvi/node-mongodb-changelog
v3.0.1
v3.0.0
Breaking changes
- Upgrade
mongodb
dependency to ^3.5.6 - Drop nodejs v8 support
New features
db
is now an argument of an operation
function. Now it is possible to write migration like this:
const changelog = require('mongodb-changelog');
const config = {mongoUrl: 'mongodb://localhost:27017/test'};
const tasks = [
{
name: 'addAppAdminUsers',
operation: (db) => {
const users = db.collection('users');
return users.insertOne({username: 'admin', password: 'test', isAdmin: true});
}
}
];
changelog(config, tasks);
Bugfixes
Close connection on migration error
1.0.0
Code has been completely rewritten using new ES2015(ES6) features such as generators, promises and others.
It is not compatible with the 0.x.x versions.
- new tasks format
- new api
- returns Promise