mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
d0a9f8c2cb
Drop the docOps collection GitOrigin-RevId: 8ffa0570ae58b6a00412d8953d3ea0fbb1869b69
23 lines
502 B
JavaScript
23 lines
502 B
JavaScript
const Helpers = require('./lib/helpers')
|
|
|
|
exports.tags = ['server-ce', 'server-pro', 'saas']
|
|
|
|
const indexes = [
|
|
{
|
|
unique: true,
|
|
key: {
|
|
doc_id: 1,
|
|
},
|
|
name: 'doc_id_1',
|
|
},
|
|
]
|
|
|
|
exports.migrate = async ({ nativeDb }) => {
|
|
const docOps = nativeDb.collection('docOps')
|
|
await Helpers.addIndexesToCollection(docOps, indexes)
|
|
}
|
|
|
|
exports.rollback = async ({ nativeDb }) => {
|
|
const docOps = nativeDb.collection('docOps')
|
|
await Helpers.dropIndexesFromCollection(docOps, indexes)
|
|
}
|