Create missing dropboxEntities mongo index (#23257)

GitOrigin-RevId: cddcb63371f45c42482e42c6fdcc16f83aa41877
This commit is contained in:
Domagoj Kriskovic
2025-01-31 11:06:33 +01:00
committed by Copybot
parent f2c6a7ddb4
commit c0caaa20c3

View File

@@ -0,0 +1,26 @@
import Helpers from './lib/helpers.mjs'
const tags = ['server-ce', 'server-pro', 'saas']
const indexes = [
{
key: { 'overleaf.userId': 1, 'overleaf.projectId': 1 },
name: 'overleaf_userId_1_overleaf_projectId_1',
},
]
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.dropboxEntities, indexes)
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.dropboxEntities, indexes)
}
export default {
tags,
migrate,
rollback,
}