Skip to content
Snippets Groups Projects
Commit 9872596d authored by Diego Sampaio's avatar Diego Sampaio Committed by Guilherme Gazzo
Browse files

chore: migration to remove redundant indexes (#30918)

parent e30f6050
No related branches found
No related tags found
No related merge requests found
......@@ -44,5 +44,6 @@ import './v308';
import './v309';
import './v310';
import './v311';
import './v312';
export * from './xrun';
import { LivechatRooms, Rooms, Subscriptions, Users } from '@rocket.chat/models';
import { addMigration } from '../../lib/migrations';
addMigration({
version: 312,
async up() {
try {
await Promise.allSettled([
LivechatRooms.col.dropIndex('v.token_1'),
Rooms.col.dropIndex('t_1'),
Subscriptions.col.dropIndex('rid_1'),
Users.col.dropIndex('active_1'),
]);
} catch (error: unknown) {
console.warn('Error dropping redundant indexes, continuing...');
console.warn(error);
}
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment