mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-18 18:12:15 +00:00
Update health_persistence.py
This commit is contained in:
@@ -102,6 +102,7 @@ class HealthPersistence:
|
|||||||
last_seen TEXT NOT NULL,
|
last_seen TEXT NOT NULL,
|
||||||
resolved_at TEXT,
|
resolved_at TEXT,
|
||||||
resolution_type TEXT,
|
resolution_type TEXT,
|
||||||
|
resolution_reason TEXT,
|
||||||
acknowledged INTEGER DEFAULT 0,
|
acknowledged INTEGER DEFAULT 0,
|
||||||
acknowledged_at TEXT,
|
acknowledged_at TEXT,
|
||||||
notification_sent INTEGER DEFAULT 0,
|
notification_sent INTEGER DEFAULT 0,
|
||||||
@@ -180,6 +181,9 @@ class HealthPersistence:
|
|||||||
if 'resolution_type' not in columns:
|
if 'resolution_type' not in columns:
|
||||||
cursor.execute('ALTER TABLE errors ADD COLUMN resolution_type TEXT')
|
cursor.execute('ALTER TABLE errors ADD COLUMN resolution_type TEXT')
|
||||||
|
|
||||||
|
if 'resolution_reason' not in columns:
|
||||||
|
cursor.execute('ALTER TABLE errors ADD COLUMN resolution_reason TEXT')
|
||||||
|
|
||||||
# Indexes for performance
|
# Indexes for performance
|
||||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_error_key ON errors(error_key)')
|
cursor.execute('CREATE INDEX IF NOT EXISTS idx_error_key ON errors(error_key)')
|
||||||
cursor.execute('CREATE INDEX IF NOT EXISTS idx_category ON errors(category)')
|
cursor.execute('CREATE INDEX IF NOT EXISTS idx_category ON errors(category)')
|
||||||
|
|||||||
Reference in New Issue
Block a user