diff --git a/backend-compliance/migrations/154_control_pendants.sql b/backend-compliance/migrations/154_control_pendants.sql new file mode 100644 index 00000000..01a56671 --- /dev/null +++ b/backend-compliance/migrations/154_control_pendants.sql @@ -0,0 +1,18 @@ +-- Migration 154: control_pendants — self-written (license_rule=3) -> sourced +-- (license_rule 1/2) Pendant-Mapping aus dem Phase-2-Reconcile (Embedding-kNN + +-- Haiku-Adjudikation, 2026-06-15). Ein hier gelistetes self-written Atom hat ein +-- kommerziell nutzbares Quell-Control, das DIESELBE Pflicht ausdrueckt -> das +-- Retrieval soll das lizenzierte Quell-Control bevorzugen. Additiv, idempotent. +-- [migration-approved] +SET search_path TO compliance, public; + +CREATE TABLE IF NOT EXISTS control_pendants ( + control_uuid uuid PRIMARY KEY, + pendant_control_uuid uuid NOT NULL, + cosine numeric, + method varchar(40) NOT NULL DEFAULT 'embed_haiku', + created_at timestamptz NOT NULL DEFAULT now() +); + +CREATE INDEX IF NOT EXISTS idx_control_pendants_pendant + ON control_pendants (pendant_control_uuid);