fix(analytics): remove duplicate sessionId index definition
- SessionSchema had both 'unique: true' and 'index: true' - unique already creates an index, making index redundant - Resolves Mongoose warning about duplicate schema index
This commit is contained in:
parent
a66c5d9016
commit
08a036be3d
2 changed files with 10 additions and 10 deletions
|
|
@ -43,8 +43,8 @@
|
|||
"last_deliberation": null
|
||||
},
|
||||
"FileEditHook": {
|
||||
"timestamp": "2025-10-23T21:07:21.094Z",
|
||||
"file": "/home/theflow/projects/tractatus/src/models/SubmissionTracking.model.js",
|
||||
"timestamp": "2025-10-23T21:21:14.842Z",
|
||||
"file": "/home/theflow/projects/tractatus/src/models/Analytics.model.js",
|
||||
"result": "passed"
|
||||
},
|
||||
"FileWriteHook": {
|
||||
|
|
@ -58,25 +58,25 @@
|
|||
"tokens": 30000
|
||||
},
|
||||
"alerts": [],
|
||||
"last_updated": "2025-10-23T21:07:21.094Z",
|
||||
"last_updated": "2025-10-23T21:21:14.842Z",
|
||||
"initialized": true,
|
||||
"framework_components": {
|
||||
"CrossReferenceValidator": {
|
||||
"message": 0,
|
||||
"tokens": 0,
|
||||
"timestamp": "2025-10-23T21:19:30.192Z",
|
||||
"last_validation": "2025-10-23T21:19:30.191Z",
|
||||
"validations_performed": 676
|
||||
"timestamp": "2025-10-23T21:21:26.151Z",
|
||||
"last_validation": "2025-10-23T21:21:26.150Z",
|
||||
"validations_performed": 679
|
||||
},
|
||||
"BashCommandValidator": {
|
||||
"message": 0,
|
||||
"tokens": 0,
|
||||
"timestamp": null,
|
||||
"last_validation": "2025-10-23T21:19:30.193Z",
|
||||
"validations_performed": 335,
|
||||
"last_validation": "2025-10-23T21:21:26.152Z",
|
||||
"validations_performed": 337,
|
||||
"blocks_issued": 37
|
||||
}
|
||||
},
|
||||
"action_count": 335,
|
||||
"action_count": 337,
|
||||
"auto_compact_events": []
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ PageViewSchema.index({ sessionId: 1, timestamp: -1 });
|
|||
|
||||
// Session Schema
|
||||
const SessionSchema = new mongoose.Schema({
|
||||
sessionId: { type: String, required: true, unique: true, index: true },
|
||||
sessionId: { type: String, required: true, unique: true }, // unique already creates index
|
||||
visitorId: { type: String, required: true, index: true },
|
||||
|
||||
startTime: { type: Date, default: Date.now },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue