mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-08-19 23:54:08 -05:00
feat: Add indexes based on the usage in the code
This commit is contained in:
@@ -33,4 +33,7 @@ FileSchema.plugin(AutoIncrementID, {
|
||||
field: 'data_id'
|
||||
});
|
||||
|
||||
FileSchema.index({ task_id: 1, boss_app_id: 1 });
|
||||
FileSchema.index({ task_id: 1, boss_app_id: 1, name: 1 });
|
||||
|
||||
export const File = mongoose.model<IFile, FileModel>('File', FileSchema);
|
||||
|
||||
@@ -20,4 +20,6 @@ const TaskSchema = new mongoose.Schema<ITask, TaskModel, ITaskMethods>({
|
||||
updated: BigInt
|
||||
}, { id: false });
|
||||
|
||||
TaskSchema.index({ boss_app_id: 1, id: 1 });
|
||||
|
||||
export const Task = mongoose.model<ITask, TaskModel>('Task', TaskSchema);
|
||||
|
||||
Reference in New Issue
Block a user