The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/server/startup/migrations/v306.ts

22 lines
477 B

import { Rooms } from '@rocket.chat/models';
import { addMigration } from '../../lib/migrations';
addMigration({
version: 306,
name: 'Adds missing ignoreThreads parameter for old rooms with retention policy overridden',
async up() {
await Rooms.updateMany(
{
'retention.enabled': true,
'retention.overrideGlobal': true,
'retention.ignoreThreads': { $exists: false },
},
{
$set: {
'retention.ignoreThreads': false,
},
},
);
},
});