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/v132.js

20 lines
471 B

import { Migrations } from '../../../app/migrations';
import { Rooms, Subscriptions } from '../../../app/models';
Migrations.add({
version: 132,
up() {
Rooms.find({ t: 'l', label: { $exists: true }, fname: { $exists: false } }).forEach(function(room) {
Rooms.update({ _id: room._id }, {
$set: {
fname: room.label,
},
});
Subscriptions.update({ rid: room._id }, {
$set: {
fname: room.label,
},
}, { multi: true });
});
},
});