Skip to content

Releases: malykhinvi/node-mongodb-changelog

v3.0.1

30 Jul 18:57
Compare
Choose a tag to compare

Add package-lock.json to gitignore

v3.0.0

26 Apr 18:08
Compare
Choose a tag to compare

Breaking changes

  1. Upgrade mongodb dependency to ^3.5.6
  2. 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

26 Dec 19:34
Compare
Choose a tag to compare

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