mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
core: ignore drop index error
This commit is contained in:
1 parent
9b0b8aba61
commit
9037a9bfd3
2 files changed
+3
-2
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "2.32.26",
|
||||
"version": "2.32.27",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -449,7 +449,8 @@ const scripts: UpgradeScript[] = [
|
||||
},
|
||||
async function _40_41() {
|
||||
const _FRESH_INSTALL_IGNORE = 1;
|
||||
await db.collection('storage').dropIndex('path_1');
|
||||
// Ignore drop index failure
|
||||
await db.collection('storage').dropIndex('path_1').catch(() => { });
|
||||
await db.collection('storage').createIndex({ path: 1, autoDelete: 1 }, { sparse: true });
|
||||
await db.collection('storage').updateMany(
|
||||
{ autoDelete: { $gte: moment().add(5, 'days').toDate() } },
|
||||
|
||||
Reference in new issue
Block a user