core: upgrade: sync existing domain settings with legacy behavior

This commit is contained in:
undefined committed 2025-03-20 17:55:10 +00:00
1 parent 2a04921de2
commit e15a310351
1 file changed
+8
+8
View File
@@ -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;
},
];