Files
ITWorx-Pulse-Public/internal/database/migrations/0011_alert_unacknowledge.sql
T
ITWorx Pulse release export bd774932d5
Public source validation / validate (push) Failing after 3m8s
Publish ITWorx Pulse source
2026-09-03 02:09:19 +02:00

9 lines
394 B
SQL

ALTER TABLE alert_occurrences
DROP CONSTRAINT alert_occurrences_event_type_check;
ALTER TABLE alert_occurrences
ADD CONSTRAINT alert_occurrences_event_type_check
CHECK (event_type IN ('evaluation', 'transition', 'acknowledge', 'unacknowledge'));
CREATE INDEX alert_instances_acknowledged_idx ON alert_instances (acknowledged_at DESC, id ASC) WHERE current_state = 'acknowledged';