diff --git a/apps/meteor/server/startup/migrations/index.ts b/apps/meteor/server/startup/migrations/index.ts index 3b14bdc9e36d..5fd057268e32 100644 --- a/apps/meteor/server/startup/migrations/index.ts +++ b/apps/meteor/server/startup/migrations/index.ts @@ -86,4 +86,5 @@ import './v259'; import './v260'; import './v261'; import './v262'; +import './v263'; import './xrun'; diff --git a/apps/meteor/server/startup/migrations/v263.ts b/apps/meteor/server/startup/migrations/v263.ts new file mode 100644 index 000000000000..e11820fe929f --- /dev/null +++ b/apps/meteor/server/startup/migrations/v263.ts @@ -0,0 +1,14 @@ +import { MongoInternals } from 'meteor/mongo'; + +import { addMigration } from '../../lib/migrations'; + +addMigration({ + version: 263, + async up() { + const { mongo } = MongoInternals.defaultRemoteCollectionDriver(); + const integrationHistory = mongo.db.collection('rocketchat_integration_history'); + + await integrationHistory.dropIndex('_updatedAt_1'); + await integrationHistory.createIndex({ _updatedAt: 1 }, { expireAfterSeconds: 30 * 24 * 60 * 60 }); + }, +});