check indexes

This commit is contained in:
Alex Holliday committed 2025-12-23 18:15:59 +00:00
1 parent 46740aa4b9
commit 6978a7e2bb
1 file changed
+14 -1
+14 -1
View File
@@ -308,6 +308,19 @@ const CheckSchema = new Schema<ICheck>(
}
);
CheckSchema.index({ "metadata.monitorId": 1, createdAt: 1 });
CheckSchema.index({ "metadata.monitorId": 1, createdAt: -1 });
CheckSchema.index({ "metadata.teamId": 1, createdAt: -1 });
CheckSchema.index({
"metadata.teamId": 1,
"metadata.monitorId": 1,
createdAt: -1,
});
CheckSchema.index({ "metadata.teamId": 1, status: 1, createdAt: -1 });
CheckSchema.index({
"metadata.teamId": 1,
"metadata.monitorId": 1,
status: 1,
createdAt: -1,
});
export const Check = mongoose.model<ICheck>("Check", CheckSchema);