Improve performance
This commit is contained in:
parent
719fac6480
commit
bca349fec1
|
@ -11,6 +11,7 @@ import DriveFileThumbnail, { deleteDriveFileThumbnail } from './drive-file-thumb
|
||||||
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
|
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
|
||||||
DriveFile.createIndex('md5');
|
DriveFile.createIndex('md5');
|
||||||
DriveFile.createIndex('metadata.uri');
|
DriveFile.createIndex('metadata.uri');
|
||||||
|
DriveFile.createIndex('metadata.userId');
|
||||||
export default DriveFile;
|
export default DriveFile;
|
||||||
|
|
||||||
export const DriveFileChunk = monkDb.get('driveFiles.chunks');
|
export const DriveFileChunk = monkDb.get('driveFiles.chunks');
|
||||||
|
|
|
@ -4,6 +4,7 @@ import db from '../db/mongodb';
|
||||||
import DriveFile from './drive-file';
|
import DriveFile from './drive-file';
|
||||||
|
|
||||||
const DriveFolder = db.get<IDriveFolder>('driveFolders');
|
const DriveFolder = db.get<IDriveFolder>('driveFolders');
|
||||||
|
DriveFolder.createIndex('userId');
|
||||||
export default DriveFolder;
|
export default DriveFolder;
|
||||||
|
|
||||||
export type IDriveFolder = {
|
export type IDriveFolder = {
|
||||||
|
|
Loading…
Reference in New Issue