fix(analytics): remove SessionSchema.index sessionId duplicate
- Line 49 has sessionId with unique: true (creates index automatically)
- Line 75 had redundant SessionSchema.index({ sessionId: 1 })
- Removed explicit index to eliminate Mongoose duplicate warning
This commit is contained in:
parent
ec5ace986d
commit
5d05d6b080
2 changed files with 9 additions and 9 deletions
|
|
@ -43,7 +43,7 @@
|
|||
"last_deliberation": null
|
||||
},
|
||||
"FileEditHook": {
|
||||
"timestamp": "2025-10-23T21:22:32.195Z",
|
||||
"timestamp": "2025-10-23T21:24:52.570Z",
|
||||
"file": "/home/theflow/projects/tractatus/src/models/Analytics.model.js",
|
||||
"result": "passed"
|
||||
},
|
||||
|
|
@ -58,25 +58,25 @@
|
|||
"tokens": 30000
|
||||
},
|
||||
"alerts": [],
|
||||
"last_updated": "2025-10-23T21:22:32.196Z",
|
||||
"last_updated": "2025-10-23T21:24:52.570Z",
|
||||
"initialized": true,
|
||||
"framework_components": {
|
||||
"CrossReferenceValidator": {
|
||||
"message": 0,
|
||||
"tokens": 0,
|
||||
"timestamp": "2025-10-23T21:22:38.898Z",
|
||||
"last_validation": "2025-10-23T21:22:38.898Z",
|
||||
"validations_performed": 683
|
||||
"timestamp": "2025-10-23T21:24:59.638Z",
|
||||
"last_validation": "2025-10-23T21:24:59.638Z",
|
||||
"validations_performed": 694
|
||||
},
|
||||
"BashCommandValidator": {
|
||||
"message": 0,
|
||||
"tokens": 0,
|
||||
"timestamp": null,
|
||||
"last_validation": "2025-10-23T21:22:38.899Z",
|
||||
"validations_performed": 340,
|
||||
"last_validation": "2025-10-23T21:24:59.639Z",
|
||||
"validations_performed": 350,
|
||||
"blocks_issued": 37
|
||||
}
|
||||
},
|
||||
"action_count": 340,
|
||||
"action_count": 350,
|
||||
"auto_compact_events": []
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ const SessionSchema = new mongoose.Schema({
|
|||
timestamps: true
|
||||
});
|
||||
|
||||
SessionSchema.index({ sessionId: 1 });
|
||||
// sessionId already indexed via unique: true on line 49
|
||||
SessionSchema.index({ visitorId: 1, startTime: -1 });
|
||||
SessionSchema.index({ startTime: -1 });
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue