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

16 lines
995 B

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