# alert_metrics table start with alert_metrics table calculated from `alert_logs` | alert_id | closed_at | service_id | tta | ttc | escalated?=false | | --------- | -------- | ---------- | --- | --- | ---------------- | primary key on alert_id foreign key on alert_id index on service_id include in alert cleanup days (on delete cascade) Add `state` column to `engine_processing_versions` to store data as JSON where needed - Version JSON state to track future changes (e.g., module update) - Not required to be fully retro-active but a nice-to-have. Should be durable to restarts/unexpected down time without losing data