Files
breakpilot-compliance/backend-compliance/migrations/156_cra_scanner_repo_map.sql
T
Benjamin Admin 4c206aa332 feat(cra): scanner-repo→IACE-Projekt-Mapping persistieren (Pull-Flow) [migration-approved]
Ersetzt die ephemere Dropdown-Auswahl durch DB-Persistenz pro IACE-Projekt:
- Migration 156: compliance_cra_scanner_repo_map (tenant_id, iace_project_id PK,
  scanner_repo_id). Additiv + idempotent.
- GET/PUT /v1/cra/scanner-repo-map/{iace_project_id} (Upsert/Clear).
- useCRA lädt das gespeicherte Repo beim Laden + persistiert bei Auswahl.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-16 07:05:33 +02:00

13 lines
541 B
SQL

-- Migration 156: persist the scanner repo chosen per IACE project for the
-- CRA/Cyber pull-flow (replaces the ephemeral UI dropdown selection). Keyed by
-- IACE project id so it works for any project, independent of a linked CRA
-- project. Additive + idempotent.
CREATE TABLE IF NOT EXISTS compliance_cra_scanner_repo_map (
tenant_id UUID NOT NULL,
iace_project_id UUID NOT NULL,
scanner_repo_id TEXT NOT NULL,
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (tenant_id, iace_project_id)
);