sensors using keys

This commit is contained in:
2026-02-20 14:11:06 -06:00
parent f9cfcf8f40
commit a84c07082c
9 changed files with 416 additions and 260 deletions

View File

@@ -0,0 +1,7 @@
-- Migration: Relax key ref format constraint
-- Description: Allow multi-segment dot-separated key refs (e.g., "pack.prefix.name")
-- The original constraint only allowed at most one dot: '^([^.]+\.)?[^.]+$'
-- Sensors create refs like "python_example.counter.rule_ref" which have multiple dots.
ALTER TABLE key DROP CONSTRAINT key_ref_format;
ALTER TABLE key ADD CONSTRAINT key_ref_format CHECK (ref ~ '^[^.]+(\.[^.]+)*$');