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/server/startup/migrations/v140.js

16 lines
401 B

import { Migrations } from '../../../app/migrations/server';
import { Messages, Rooms } from '../../../app/models/server';
Migrations.add({
version: 140,
up() {
Messages.find({ drid: { $exists: 1 } }, { fields: { drid: 1 } }).forEach(({ _id, drid }) => Rooms.findOne({ _id: drid }) || Messages.update({ _id }, {
$unset: {
drid: 1,
dcount: 1,
dlm: 1,
t: 1,
},
}));
},
});