diff --git a/src/models/drive-file.ts b/src/models/drive-file.ts index ca1a42b053..4b87b26a8c 100644 --- a/src/models/drive-file.ts +++ b/src/models/drive-file.ts @@ -11,6 +11,7 @@ import DriveFileThumbnail, { deleteDriveFileThumbnail } from './drive-file-thumb const DriveFile = monkDb.get('driveFiles.files'); DriveFile.createIndex('md5'); DriveFile.createIndex('metadata.uri'); +DriveFile.createIndex('metadata.userId'); export default DriveFile; export const DriveFileChunk = monkDb.get('driveFiles.chunks'); diff --git a/src/models/drive-folder.ts b/src/models/drive-folder.ts index def519fade..4270157694 100644 --- a/src/models/drive-folder.ts +++ b/src/models/drive-folder.ts @@ -4,6 +4,7 @@ import db from '../db/mongodb'; import DriveFile from './drive-file'; const DriveFolder = db.get('driveFolders'); +DriveFolder.createIndex('userId'); export default DriveFolder; export type IDriveFolder = {