From dc53f52c65c4a19389ecf179566586aaa3463d08 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 9 Nov 2017 00:13:32 +0900 Subject: [PATCH] Fix bug --- tools/migration/node.2017-11-08.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/migration/node.2017-11-08.js b/tools/migration/node.2017-11-08.js index 097f940446..c5a5176fa5 100644 --- a/tools/migration/node.2017-11-08.js +++ b/tools/migration/node.2017-11-08.js @@ -63,7 +63,7 @@ const migrate = async (doc) => { } async function main() { - const count = await db.get('users').count(); + const count = await User.count(); console.log(`there are ${count} users.`) @@ -74,7 +74,7 @@ async function main() { 1, async (time) => { console.log(`${time} / ${idop}`) - const docs = await db.get('users').find({}, { limit: dop, skip: time * dop }) + const docs = await User.find({}, { limit: dop, skip: time * dop }) return Promise.all(docs.map(migrate)) }, idop