2021-07-21 06:34:09 -04:00
|
|
|
const Helpers = require('./lib/helpers')
|
|
|
|
|
|
|
|
exports.tags = ['server-ce', 'server-pro', 'saas']
|
|
|
|
|
|
|
|
const indexes = [
|
|
|
|
{
|
|
|
|
unique: true,
|
|
|
|
key: {
|
|
|
|
doc_id: 1,
|
|
|
|
},
|
|
|
|
name: 'doc_id_1',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2024-01-31 10:44:02 -05:00
|
|
|
exports.migrate = async ({ nativeDb }) => {
|
|
|
|
const docOps = nativeDb.collection('docOps')
|
|
|
|
await Helpers.addIndexesToCollection(docOps, indexes)
|
2021-07-21 06:34:09 -04:00
|
|
|
}
|
|
|
|
|
2024-01-31 10:44:02 -05:00
|
|
|
exports.rollback = async ({ nativeDb }) => {
|
|
|
|
const docOps = nativeDb.collection('docOps')
|
|
|
|
await Helpers.dropIndexesFromCollection(docOps, indexes)
|
2021-07-21 06:34:09 -04:00
|
|
|
}
|