fix(models): remove duplicate schema indexes for clean startup
- GovernanceRule: Remove duplicate category index (uses compound index) - VerificationLog: Remove duplicate verifiedAt index (uses compound + TTL) - VariableValue: Remove duplicate category index (standalone index exists) Eliminates 3 Mongoose duplicate index warnings on server startup Server now starts with zero warnings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d11fb7fb58
commit
032f842a96
3 changed files with 3 additions and 3 deletions
|
|
@ -74,7 +74,7 @@ const governanceRuleSchema = new mongoose.Schema({
|
||||||
type: String,
|
type: String,
|
||||||
enum: ['content', 'security', 'privacy', 'technical', 'process', 'values', 'other'],
|
enum: ['content', 'security', 'privacy', 'technical', 'process', 'values', 'other'],
|
||||||
default: 'other',
|
default: 'other',
|
||||||
index: true,
|
// Note: Indexed via compound index { category: 1, active: 1 } below
|
||||||
description: 'Category for filtering and organization'
|
description: 'Category for filtering and organization'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ const variableValueSchema = new mongoose.Schema({
|
||||||
type: String,
|
type: String,
|
||||||
enum: ['database', 'security', 'config', 'path', 'url', 'port', 'credential', 'feature_flag', 'other'],
|
enum: ['database', 'security', 'config', 'path', 'url', 'port', 'credential', 'feature_flag', 'other'],
|
||||||
default: 'other',
|
default: 'other',
|
||||||
index: true,
|
// Note: Indexed via standalone index { category: 1 } below
|
||||||
description: 'Category for organizing variables'
|
description: 'Category for organizing variables'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ const verificationLogSchema = new mongoose.Schema({
|
||||||
verifiedAt: {
|
verifiedAt: {
|
||||||
type: Date,
|
type: Date,
|
||||||
default: Date.now,
|
default: Date.now,
|
||||||
index: true,
|
// Note: Indexed via compound indexes and TTL index below
|
||||||
description: 'When verification was performed'
|
description: 'When verification was performed'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue