diff --git a/services/web/migrations/20250702203054_recurly_subscription_id_index.mjs b/services/web/migrations/20250702203054_recurly_subscription_id_index.mjs new file mode 100644 index 0000000000..49d7413e11 --- /dev/null +++ b/services/web/migrations/20250702203054_recurly_subscription_id_index.mjs @@ -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, +}