20260302141605_add_group_id_index_domainVerifications.mjs 525 B

12345678910111213141516171819202122232425262728293031
  1. /* eslint-disable no-unused-vars */
  2. import Helpers from './lib/helpers.mjs'
  3. const tags = ['saas']
  4. const indexes = [
  5. {
  6. key: { groupId: 1 },
  7. name: 'groupId_1',
  8. },
  9. ]
  10. const migrate = async client => {
  11. const { db } = client
  12. await Helpers.addIndexesToCollection(db.domainVerifications, indexes)
  13. }
  14. const rollback = async client => {
  15. const { db } = client
  16. await Helpers.dropIndexesFromCollection(db.domainVerifications, [
  17. { name: 'groupId_1' },
  18. ])
  19. }
  20. export default {
  21. tags,
  22. migrate,
  23. rollback,
  24. }