mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-28 04:40:53 +00:00
55c1f852d6
[third-party-datastore] keep dropbox folder names up-to-date GitOrigin-RevId: d82a6cb7b10ee2c81c5769d02896f65a347bbf67
24 lines
467 B
JavaScript
24 lines
467 B
JavaScript
const Helpers = require('./lib/helpers')
|
|
|
|
exports.tags = ['saas']
|
|
|
|
const indexes = [
|
|
{
|
|
key: {
|
|
userId: 1,
|
|
dropboxId: 1,
|
|
},
|
|
unique: true,
|
|
name: 'userId_dropboxId_1',
|
|
},
|
|
]
|
|
|
|
exports.migrate = async client => {
|
|
const { db } = client
|
|
await Helpers.addIndexesToCollection(db.dropboxProjects, indexes)
|
|
}
|
|
|
|
exports.rollback = async client => {
|
|
const { db } = client
|
|
await Helpers.dropIndexesFromCollection(db.dropboxProjects, indexes)
|
|
}
|