All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 32s
CI / test-python-backend-compliance (push) Successful in 30s
CI / test-python-document-crawler (push) Successful in 21s
CI / test-python-dsms-gateway (push) Successful in 18s
6-Phasen-Implementation fuer cloud-faehiges, mandantenfaehiges Compliance SDK:
Phase 1: Multi-Tenancy Fix
- Shared tenant_utils.py Dependency (UUID-Validierung, kein "default" mehr)
- VVT tenant_id Column + tenant-scoped Queries
- DSFA/Vendor DEFAULT_TENANT_ID von "default" auf UUID migriert
- Migration 035
Phase 2: Stammdaten-Erweiterung
- Company Profile um JSONB-Felder erweitert (processing_systems, ai_systems, technical_contacts)
- Regulierungs-Flags (NIS2, AI Act, ISO 27001)
- GET /template-context Endpoint
- Migration 036
Phase 3: Dokument-Versionierung
- 5 Versions-Tabellen (DSFA, VVT, TOM, Loeschfristen, Obligations)
- Shared versioning_utils.py Helper
- /{id}/versions Endpoints auf allen 5 Dokumenttypen
- Migration 037
Phase 4: Change-Request System
- Zentrale CR-Inbox mit CRUD + Accept/Reject/Edit Workflow
- Regelbasierte CR-Engine (VVT DPIA → DSFA CR, Datenkategorien → Loeschfristen CR)
- Audit-Trail
- Migration 038
Phase 5: Dokumentengenerierung
- 5 Template-Generatoren (DSFA, VVT, TOM, Loeschfristen, Obligations)
- Preview + Apply Endpoints (erzeugt CRs, keine direkten Dokumente)
Phase 6: Frontend-Integration
- Change-Request Inbox Page mit Stats, Filtern, Modals
- VersionHistory Timeline-Komponente
- SDKSidebar CR-Badge (60s Polling)
- Company Profile: 2 neue Wizard-Steps + "Dokumente generieren" CTA
Docs: 5 neue MkDocs-Seiten, CLAUDE.md aktualisiert
Tests: 97 neue Tests (alle bestanden)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
1.6 KiB
PL/PgSQL
35 lines
1.6 KiB
PL/PgSQL
-- Migration 036: Extend company_profiles with systems, AI, legal context
|
|
-- Adds structured JSONB fields for document generation and compliance automation
|
|
|
|
BEGIN;
|
|
|
|
-- ============================================================================
|
|
-- 1. JSONB fields for systems & document sources
|
|
-- ============================================================================
|
|
|
|
ALTER TABLE compliance_company_profiles
|
|
ADD COLUMN IF NOT EXISTS repos JSONB DEFAULT '[]'::jsonb,
|
|
ADD COLUMN IF NOT EXISTS document_sources JSONB DEFAULT '[]'::jsonb,
|
|
ADD COLUMN IF NOT EXISTS processing_systems JSONB DEFAULT '[]'::jsonb,
|
|
ADD COLUMN IF NOT EXISTS ai_systems JSONB DEFAULT '[]'::jsonb,
|
|
ADD COLUMN IF NOT EXISTS technical_contacts JSONB DEFAULT '[]'::jsonb;
|
|
|
|
-- ============================================================================
|
|
-- 2. Regulatory booleans
|
|
-- ============================================================================
|
|
|
|
ALTER TABLE compliance_company_profiles
|
|
ADD COLUMN IF NOT EXISTS subject_to_nis2 BOOLEAN DEFAULT FALSE,
|
|
ADD COLUMN IF NOT EXISTS subject_to_ai_act BOOLEAN DEFAULT FALSE,
|
|
ADD COLUMN IF NOT EXISTS subject_to_iso27001 BOOLEAN DEFAULT FALSE;
|
|
|
|
-- ============================================================================
|
|
-- 3. Supervisory authority & review cycle
|
|
-- ============================================================================
|
|
|
|
ALTER TABLE compliance_company_profiles
|
|
ADD COLUMN IF NOT EXISTS supervisory_authority VARCHAR(255),
|
|
ADD COLUMN IF NOT EXISTS review_cycle_months INTEGER DEFAULT 12;
|
|
|
|
COMMIT;
|