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

24 lines
527 B

import { Migrations } from '../../../app/migrations/server';
import { Sessions } from '../../../app/models/server';
Migrations.add({
version: 144,
up() {
console.log('Restoring sessions data');
Promise.await(Sessions.model.rawCollection().removeMany({
type: 'user_daily',
}));
Promise.await(Sessions.model.rawCollection().updateMany({
type: 'computed-session',
}, {
$set: {
type: 'session',
},
$unset: {
_computedAt: 1,
},
}));
console.log('Restoring sessions data - Done');
},
});