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

29 lines
496 B

import { Migrations } from '../../../app/migrations';
import { Settings } from '../../../app/models';
Migrations.add({
version: 31,
up() {
const changes = {
API_Analytics: 'GoogleTagManager_id',
};
for (const from of Object.keys(changes)) {
const to = changes[from];
const record = Settings.findOne({
_id: from,
});
if (record) {
delete record._id;
Settings.upsert({
_id: to,
}, record);
}
Settings.remove({
_id: from,
});
}
},
});