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

19 lines
943 B

import { Migrations } from '../../../app/migrations';
import { Settings } from '../../../app/models';
Migrations.add({
version: 109,
up() {
const FileUpload_GoogleStorage_Proxy = (Settings.findOne({ _id: 'FileUpload_GoogleStorage_Proxy' }) || {}).value === true;
const FileUpload_S3_Proxy = (Settings.findOne({ _id: 'FileUpload_S3_Proxy' }) || {}).value === true;
Settings.update({ _id: 'FileUpload_GoogleStorage_Proxy_Avatars' }, { $set: { value: FileUpload_GoogleStorage_Proxy } });
Settings.update({ _id: 'FileUpload_GoogleStorage_Proxy_Uploads' }, { $set: { value: FileUpload_GoogleStorage_Proxy } });
Settings.update({ _id: 'FileUpload_S3_Proxy_Avatars' }, { $set: { value: FileUpload_S3_Proxy } });
Settings.update({ _id: 'FileUpload_S3_Proxy_Uploads' }, { $set: { value: FileUpload_S3_Proxy } });
Settings.remove({ _id: 'FileUpload_GoogleStorage_Proxy' });
Settings.remove({ _id: 'FileUpload_S3_Proxy' });
},
});