Merge pull request #26794 from overleaf/em-subscription-index

Add an index on recurlySubscription_id

GitOrigin-RevId: 06c20df8e94e4aebeb0f49acec5babad0f1c4031
This commit is contained in:
Eric Mc Sween
2025-07-03 09:47:55 -04:00
committed by Copybot
parent 4e40f24a9e
commit cbe96f21cb

View File

@@ -0,0 +1,23 @@
import Helpers from './lib/helpers.mjs'
const tags = ['saas']
const indexes = [
{ key: { recurlySubscription_id: 1 }, name: 'recurlySubscription_id_1' },
]
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.subscriptions, indexes)
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.subscriptions, indexes)
}
export default {
tags,
migrate,
rollback,
}