diff --git a/lib/mongodb.js b/lib/mongodb.js index f32ad88f9..f1b44bf67 100644 --- a/lib/mongodb.js +++ b/lib/mongodb.js @@ -2228,7 +2228,7 @@ MongoDB.prototype.autoupdate = function(models, cb) { debug('createIndex: ', index); } const callbackCreateIndex = util.callbackify(() => self - .collection(modelName).createIndex(index.fields || index.keys)); + .collection(modelName).createIndex(index.fields || index.keys, index.options)); callbackCreateIndex(indexCallback); }, modelCallback,