Add indices to Check model
This commit is contained in:
1 parent
319e6d6017
commit
91e7229b23
1 file changed
+3
@@ -67,5 +67,8 @@ const BaseCheckSchema = mongoose.Schema({
|
||||
*/
|
||||
const CheckSchema = mongoose.Schema({ ...BaseCheckSchema.obj }, { timestamps: true });
|
||||
CheckSchema.index({ createdAt: 1 });
|
||||
CheckSchema.index({ monitorId: 1, createdAt: 1 });
|
||||
CheckSchema.index({ monitorId: 1, createdAt: -1 });
|
||||
|
||||
export default mongoose.model("Check", CheckSchema);
|
||||
export { BaseCheckSchema };
|
||||
Reference in new issue
Block a user