diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-11-07 21:12:08 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-11-07 21:12:08 +0900 |
| commit | 71b1de8367f1436ad3e4c2c9585029949ea7372f (patch) | |
| tree | 34da787941e5c726091bc28218feee8d2a16a8f1 /tools | |
| parent | #882 (diff) | |
| download | sharkey-71b1de8367f1436ad3e4c2c9585029949ea7372f.tar.gz sharkey-71b1de8367f1436ad3e4c2c9585029949ea7372f.tar.bz2 sharkey-71b1de8367f1436ad3e4c2c9585029949ea7372f.zip | |
Fix bug
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/migration/issue_882.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/migration/issue_882.js b/tools/migration/issue_882.js index 67a1551e04..8dab9bb438 100644 --- a/tools/migration/issue_882.js +++ b/tools/migration/issue_882.js @@ -17,12 +17,12 @@ const migrate = async (doc) => { async function main() { let i = 0; - const count = await db.get('drive_files').count({}); + const count = await DriveFile.count({}); const iterate = async () => { if (i == count) return true; console.log(`${i} / ${count}`); - const doc = (await db.get('drive_files').find({}, { limit: 1, skip: i }))[0] + const doc = (await DriveFile.find({}, { limit: 1, skip: i }))[0] const res = await migrate(doc); if (!res) { return false; |