Drop "project_id" index in rooms collection (#23423)

GitOrigin-RevId: ed0bcda9066f3ff595aae1ce6011335aaac7aaf0
This commit is contained in:
Domagoj Kriskovic
2025-02-11 14:41:30 +01:00
committed by Copybot
parent 510ad0ce9a
commit 01e8159801

View File

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