20220811111800_create_dropboxEntities_index.mjs 467 B

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