This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user