Add indices to HardwareCheck model

This commit is contained in:
Alex Holliday committed 2024-12-28 09:35:00 -08:00
1 parent 91e7229b23
commit ce3e7cf384
1 file changed
+2
+2
View File
@@ -64,5 +64,7 @@ const HardwareCheckSchema = mongoose.Schema(
);
HardwareCheckSchema.index({ createdAt: 1 });
HardwareCheckSchema.index({ monitorId: 1, createdAt: 1 });
HardwareCheckSchema.index({ monitorId: 1, createdAt: -1 });
export default mongoose.model("HardwareCheck", HardwareCheckSchema);