mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-06 00:11:24 +00:00
Merge pull request #9291 from overleaf/jpa-dropbox-project-id
[third-party-datastore] tracking of dropboxId for project folder GitOrigin-RevId: fd47441c81ba1a845dac6d34557ceed2dcbdd7fe
This commit is contained in:
parent
3538590559
commit
7225f3ea75
2 changed files with 25 additions and 0 deletions
|
@ -39,6 +39,7 @@ async function setupDb() {
|
|||
db.deletedSubscriptions = internalDb.collection('deletedSubscriptions')
|
||||
db.deletedUsers = internalDb.collection('deletedUsers')
|
||||
db.dropboxEntities = internalDb.collection('dropboxEntities')
|
||||
db.dropboxProjects = internalDb.collection('dropboxProjects')
|
||||
db.docHistory = internalDb.collection('docHistory')
|
||||
db.docHistoryIndex = internalDb.collection('docHistoryIndex')
|
||||
db.docOps = internalDb.collection('docOps')
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
const Helpers = require('./lib/helpers')
|
||||
|
||||
exports.tags = ['saas']
|
||||
|
||||
const indexes = [
|
||||
{
|
||||
key: {
|
||||
userId: 1,
|
||||
projectId: 1,
|
||||
},
|
||||
unique: true,
|
||||
name: 'projectId_userId_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