20210721081758_create_history_display_index.mjs 487 B

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