mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Create migration to add history display state index (#4335)
GitOrigin-RevId: 26a03c0192ae673110bfa65e0b293c586dc4958a
This commit is contained in:
parent
86099725ad
commit
35ee137067
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
const Helpers = require('./lib/helpers')
|
||||
|
||||
exports.tags = ['saas']
|
||||
|
||||
const indexes = [
|
||||
{
|
||||
key: {
|
||||
'overleaf.history.display': 1,
|
||||
},
|
||||
name: 'overleaf.history.display_1',
|
||||
},
|
||||
]
|
||||
|
||||
exports.migrate = async client => {
|
||||
const { db } = client
|
||||
await Helpers.addIndexesToCollection(db.projects, indexes)
|
||||
}
|
||||
|
||||
exports.rollback = async client => {
|
||||
const { db } = client
|
||||
await Helpers.dropIndexesFromCollection(db.projects, indexes)
|
||||
}
|
Loading…
Reference in a new issue