20220811111800_create_dropboxEntities_index.js 423 B

12345678910111213141516171819202122
  1. const Helpers = require('./lib/helpers')
  2. exports.tags = ['saas']
  3. const indexes = [
  4. {
  5. key: {
  6. entityId: 1,
  7. },
  8. name: 'entityId_1',
  9. },
  10. ]
  11. exports.migrate = async client => {
  12. const { db } = client
  13. await Helpers.addIndexesToCollection(db.dropboxEntities, indexes)
  14. }
  15. exports.rollback = async client => {
  16. const { db } = client
  17. await Helpers.dropIndexesFromCollection(db.dropboxEntities, indexes)
  18. }