mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-27 04:30:56 +00:00
Merge pull request #9447 from overleaf/jpa-dropbox-refresh-project-folder-names
[third-party-datastore] keep dropbox folder names up-to-date GitOrigin-RevId: d82a6cb7b10ee2c81c5769d02896f65a347bbf67
This commit is contained in:
parent
6169ba55e5
commit
55c1f852d6
1 changed files with 24 additions and 0 deletions
|
@ -0,0 +1,24 @@
|
|||
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)
|
||||
}
|
Loading…
Reference in a new issue