mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Create missing dropboxEntities mongo index (#23257)
GitOrigin-RevId: cddcb63371f45c42482e42c6fdcc16f83aa41877
This commit is contained in:
committed by
Copybot
parent
f2c6a7ddb4
commit
c0caaa20c3
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user