From aaa00eb97a4487f1923880464e4814ed22bbb7b9 Mon Sep 17 00:00:00 2001 From: Stefan Hattrell <29941279+digorgonzola@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:19:32 +1000 Subject: [PATCH] fix: include options parameter in createIndex method Signed-off-by: Stefan Hattrell <29941279+digorgonzola@users.noreply.github.com> --- lib/mongodb.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,