mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: upgrade: sync existing domain settings with legacy behavior
This commit is contained in:
1 parent
2a04921de2
commit
e15a310351
1 file changed
+8
@@ -702,4 +702,12 @@ export const coreScripts: MigrationScript[] = [
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// Start Hydro v5
|
// Start Hydro v5
|
||||||
|
async function _91_92() {
|
||||||
|
await db.collection('domain.user').updateMany({}, { $set: { join: true } });
|
||||||
|
const ddocs = await domain.coll.updateMany(
|
||||||
|
{ _join: { $or: [{ $exists: false }, { $eq: null }] } },
|
||||||
|
{ $set: { _join: { method: domain.JOIN_METHOD_ALL, role: 'default', expire: null }, _migratedJoin: true } },
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
},
|
||||||
];
|
];
|
||||||
Reference in new issue
Block a user