20250702203054_recurly_subscription_id_index.mjs 469 B

1234567891011121314151617181920212223
  1. import Helpers from './lib/helpers.mjs'
  2. const tags = ['saas']
  3. const indexes = [
  4. { key: { recurlySubscription_id: 1 }, name: 'recurlySubscription_id_1' },
  5. ]
  6. const migrate = async client => {
  7. const { db } = client
  8. await Helpers.addIndexesToCollection(db.subscriptions, indexes)
  9. }
  10. const rollback = async client => {
  11. const { db } = client
  12. await Helpers.dropIndexesFromCollection(db.subscriptions, indexes)
  13. }
  14. export default {
  15. tags,
  16. migrate,
  17. rollback,
  18. }