mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2025-07-25 11:00:07 +02:00

Add an index on recurlySubscription_id GitOrigin-RevId: 06c20df8e94e4aebeb0f49acec5babad0f1c4031
23 lines
469 B
JavaScript
23 lines
469 B
JavaScript
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,
|
|
}
|