mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +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
|
||||
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