sensors using keys
This commit is contained in:
7
migrations/20260220000000_relax_key_ref_format.sql
Normal file
7
migrations/20260220000000_relax_key_ref_format.sql
Normal 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 ~ '^[^.]+(\.[^.]+)*$');
|
||||
Reference in New Issue
Block a user