dropboxProjects maps a project to its folder in one user’s Dropbox. A project shared with several Dropbox users has one document per user. It belongs to Dropbox sync: third-party-datastore (services/third-party-datastore/app/js/StateManager.mjs) writes it, and the dropbox web module (services/web/modules/dropbox/app/src/DropboxHandler.mjs) reads it and clears it. There is no Mongoose schema.
Fields
Who Writes It
Who Reads It
Indexes
CE has no other index here. The unique indexes
projectId_userId_1 and userId_dropboxId_1 come from tools/migrations/20220815105500_create_dropboxProjects_index.mjs and 20220817120900_create_dropboxProjects_index.mjs, which are tagged saas only, so CE never runs them.
Notes
- Uniqueness comes only from the delete before each insert in
setProjectFolder(StateManager.mjs:140-149). The comment atStateManager.mjs:3-11mentions unique indexes; CE does not have them. - When a project’s mapping is removed, its folder stays in Dropbox. An edit there is then read as a new project, as for a folder made in Dropbox (
DropboxHandler.mjs:148-149). - A deleted project keeps its mapping until it expires, because it can still be restored (
index.mjs:52-53). - The user’s Dropbox
list_foldercursor is not here. It isusers.dropbox.cursor(StateManager.mjs:177-184).

