Files
breakpilot-compliance/backend-compliance/migrations/033_vvt_consolidation.sql
Benjamin Admin 4cbfea5c1d feat(vvt): Go-Features nach Python portieren (Source of Truth)
Review-Daten (last_reviewed_at, next_review_at), created_by, DSFA-Link,
CSV-Export mit Semikolon-Trennung, overdue_review_count in Stats.
Go-VVT-Handler als DEPRECATED markiert. 32 Tests bestanden.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 17:14:38 +01:00

15 lines
664 B
SQL

-- 033_vvt_consolidation.sql
-- Portiert Go-exklusive VVT-Features nach Python (Source of Truth)
-- P0: Review-Daten, created_by | P1: DSFA-Link
ALTER TABLE compliance_vvt_activities
ADD COLUMN IF NOT EXISTS last_reviewed_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS next_review_at TIMESTAMPTZ,
ADD COLUMN IF NOT EXISTS created_by VARCHAR(200) DEFAULT 'system',
ADD COLUMN IF NOT EXISTS dsfa_id UUID;
CREATE INDEX IF NOT EXISTS idx_vvt_activities_dsfa
ON compliance_vvt_activities(dsfa_id) WHERE dsfa_id IS NOT NULL;
CREATE INDEX IF NOT EXISTS idx_vvt_activities_next_review
ON compliance_vvt_activities(next_review_at) WHERE next_review_at IS NOT NULL;