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

22 lines
510 B

import { Migrations } from '../../../app/migrations/server';
import { Settings } from '../../../app/models';
const validSettings = [
'FEDERATION_Discovery_Method',
'FEDERATION_Domain',
'FEDERATION_Enabled',
'FEDERATION_Hub_URL',
'FEDERATION_Public_Key',
'FEDERATION_Status',
'FEDERATION_Test_Setup',
];
Migrations.add({
version: 147,
up() {
Settings.remove({ $and: [{ _id: /FEDERATION/ }, { _id: { $nin: validSettings } }] });
},
down() {
// Down migration does not apply in this case
},
});