overleaf/services/web/migrations/20210721081758_create_history_display_index.mjs

29 lines
487 B
JavaScript
Raw Normal View History

import Helpers from './lib/helpers.mjs'
const tags = ['saas']
const indexes = [
{
key: {
'overleaf.history.display': 1,
},
name: 'overleaf.history.display_1',
},
]
const migrate = async client => {
const { db } = client
await Helpers.addIndexesToCollection(db.projects, indexes)
}
const rollback = async client => {
const { db } = client
await Helpers.dropIndexesFromCollection(db.projects, indexes)
}
export default {
tags,
migrate,
rollback,
}