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:
TheFlow 2025-10-12 16:35:45 +13:00
parent d11fb7fb58
commit 032f842a96
3 changed files with 3 additions and 3 deletions

View file

@ -74,7 +74,7 @@ const governanceRuleSchema = new mongoose.Schema({
type: String,
enum: ['content', 'security', 'privacy', 'technical', 'process', 'values', 'other'],
default: 'other',
index: true,
// Note: Indexed via compound index { category: 1, active: 1 } below
description: 'Category for filtering and organization'
},

View file

@ -58,7 +58,7 @@ const variableValueSchema = new mongoose.Schema({
type: String,
enum: ['database', 'security', 'config', 'path', 'url', 'port', 'credential', 'feature_flag', 'other'],
default: 'other',
index: true,
// Note: Indexed via standalone index { category: 1 } below
description: 'Category for organizing variables'
},

View file

@ -201,7 +201,7 @@ const verificationLogSchema = new mongoose.Schema({
verifiedAt: {
type: Date,
default: Date.now,
index: true,
// Note: Indexed via compound indexes and TTL index below
description: 'When verification was performed'
}