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

26 lines
453 B

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