From a47015e5824f5bc413d30c483c0d96727e92c31e Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 7 Nov 2017 19:19:19 +0900 Subject: [PATCH] Fix bug --- tools/migration/use-gridfs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/migration/use-gridfs.js b/tools/migration/use-gridfs.js index 313b10859..02c0b2f6a 100644 --- a/tools/migration/use-gridfs.js +++ b/tools/migration/use-gridfs.js @@ -49,7 +49,7 @@ async function main() { const iterate = async () => { if (i == count) return true; - const doc = await db.get('drive_files').find({}, { skip: i }) + const doc = await db.get('drive_files').find({}, { limit: 1, skip: i }) const res = await migrateToGridFS(doc); if (!res) { return false;