mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix pid sort
This commit is contained in:
1 parent
19ebf5e9a8
commit
65094e53b6
3 files changed
+5
-2
No files matched your search
@@ -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;
|
||||
Reference in new issue
Block a user