Public source validation / validate (push) Failing after 3m8s
9 lines
339 B
SQL
9 lines
339 B
SQL
ALTER TABLE alert_rules
|
|
ADD COLUMN cooldown_seconds integer NOT NULL DEFAULT 0 CHECK (cooldown_seconds BETWEEN 0 AND 2592000);
|
|
|
|
ALTER TABLE alert_instances
|
|
ADD COLUMN cooldown_until timestamptz;
|
|
|
|
CREATE INDEX alert_instances_cooldown_idx ON alert_instances (cooldown_until, current_state, id)
|
|
WHERE cooldown_until IS NOT NULL;
|