mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
24 lines
417 B
JavaScript
24 lines
417 B
JavaScript
|
const Helpers = require('./lib/helpers')
|
||
|
|
||
|
exports.tags = ['saas']
|
||
|
|
||
|
const indexes = [
|
||
|
{
|
||
|
key: {
|
||
|
name: 1,
|
||
|
},
|
||
|
unique: true,
|
||
|
name: 'name_1',
|
||
|
},
|
||
|
]
|
||
|
|
||
|
exports.migrate = async client => {
|
||
|
const { db } = client
|
||
|
await Helpers.addIndexesToCollection(db.splittests, indexes)
|
||
|
}
|
||
|
|
||
|
exports.rollback = async client => {
|
||
|
const { db } = client
|
||
|
Helpers.dropIndexesFromCollection(db.splittests, indexes)
|
||
|
}
|