db-migrate / mongodb

mongodb driver for db-migrate
Other
25 stars 58 forks source link

Fleshed out update function #9

Open stelio opened 8 years ago

stelio commented 8 years ago

My attempt at completing the update function so that the usage is somewhat in line with the docs (https://db-migrate.readthedocs.io/en/latest/Getting%20Started/usage/#update-table-data-searchclauseid).

However usage looks more like:

exports.up = function(db, callback) {
  return db.update('users', { roles: ['guest'] }, { $set: {roles: ['admin']} }, {}, callback);
};