20210721081758_create_history_display_index.js 443 B

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