Create new projectId_1_threadId_1 index for rooms collection (#23422)

GitOrigin-RevId: 180799e5b045ba7f07e1dbda5b9d25b52741bd14
This commit is contained in:
Domagoj Kriskovic 2025-02-10 12:34:14 +01:00 committed by Copybot
parent 0eaa0c47e4
commit 32bb4d36bb

View file

@ -0,0 +1,31 @@
/* eslint-disable no-unused-vars */
import Helpers from './lib/helpers.mjs'
const tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: {
project_id: 1,
thread_id: 1,
},
name: 'project_id_1_thread_id_1',
},
]
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.rooms, indexes)
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.rooms, indexes)
}
export default {
tags,
migrate,
rollback,
}