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/apps/meteor/server/startup/migrations/v323.ts

27 lines
651 B

import { AppLogs } from '@rocket.chat/models';
import { addMigration } from '../../lib/migrations';
// Remove outdated indexes on rocketchat_apps_logs
addMigration({
version: 323,
name: 'Remove outdated indexes on rocketchat_apps_logs',
async up() {
// Idempotent drops: ignore "IndexNotFound" (code 27)
try {
await AppLogs.col.dropIndex('appId_indexed_query');
} catch (e: any) {
if (e?.code !== 27 && e?.codeName !== 'IndexNotFound') {
throw e;
}
}
try {
await AppLogs.col.dropIndex('general_logs_index');
} catch (e: any) {
if (e?.code !== 27 && e?.codeName !== 'IndexNotFound') {
throw e;
}
}
},
});