core: fix pid sort

This commit is contained in:
undefined committed 2020-11-23 22:13:43 +08:00
1 parent 19ebf5e9a8
commit 65094e53b6
3 files changed
+5 -2

No files matched your search

+4
View File
@@ -1,6 +1,7 @@
/* eslint-disable no-await-in-loop */
import * as domain from './model/domain';
import * as document from './model/document';
import { db } from './service/db';
type UpgradeScript = () => Promise<void>;
@@ -29,6 +30,9 @@ const scripts: UpgradeScript[] = [
if (bulk.length) await bulk.execute();
}
},
async function _2_3() {
await db.collection('document').updateMany({ pid: /^\d+$/i }, { $unset: { pid: '' } });
},
];
export = scripts;