Fix retention query performance and cleanup scheduling
This commit is contained in:
@@ -522,6 +522,7 @@ CREATE TABLE IF NOT EXISTS provisioning_sources (
|
||||
server TEXT NOT NULL,
|
||||
PRIMARY KEY (operation_id, kind, source_id, server)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_provisioning_sources_source ON provisioning_sources(kind, source_id);
|
||||
|
||||
-- Blueprints retain map/count selections only. The legacy column name remains
|
||||
-- compatible with older snapshot-based definitions, read as selections at runtime.
|
||||
@@ -732,6 +733,7 @@ CREATE TABLE IF NOT EXISTS watchdog_actions (
|
||||
cycle INTEGER NOT NULL DEFAULT 1,
|
||||
UNIQUE(incident_id,cycle,action)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_watchdog_actions_campaign ON watchdog_actions(campaign_id);
|
||||
|
||||
-- Explicit history holds and failure resolution never bypass dependency checks.
|
||||
CREATE TABLE IF NOT EXISTS retention_controls (
|
||||
|
||||
Reference in New Issue
Block a user