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

18 lines
433 B

import { Migrations } from '../../../app/migrations';
import { Users } from '../../../app/models';
Migrations.add({
version: 73,
up() {
Users.find({ 'oauth.athorizedClients': { $exists: true } }, { oauth: 1 }).forEach(function(user) {
Users.update({ _id: user._id }, {
$set: {
'oauth.authorizedClients': user.oauth.athorizedClients,
},
$unset: {
'oauth.athorizedClients': 1,
},
});
});
},
});