Files
Benjamin Admin 49ce417428
All checks were successful
CI/CD / go-lint (push) Has been skipped
CI/CD / python-lint (push) Has been skipped
CI/CD / nodejs-lint (push) Has been skipped
CI/CD / test-go-ai-compliance (push) Successful in 32s
CI/CD / test-python-backend-compliance (push) Successful in 34s
CI/CD / test-python-document-crawler (push) Successful in 23s
CI/CD / test-python-dsms-gateway (push) Successful in 21s
CI/CD / validate-canonical-controls (push) Successful in 11s
CI/CD / Deploy (push) Successful in 2s
feat: add compliance modules 2-5 (dashboard, security templates, process manager, evidence collector)
Module 2: Extended Compliance Dashboard with roadmap, module-status, next-actions, snapshots, score-history
Module 3: 7 German security document templates (IT-Sicherheitskonzept, Datenschutz, Backup, Logging, Incident-Response, Zugriff, Risikomanagement)
Module 4: Compliance Process Manager with CRUD, complete/skip/seed, ~50 seed tasks, 3-tab UI
Module 5: Evidence Collector Extended with automated checks, control-mapping, coverage report, 4-tab UI

Also includes: canonical control library enhancements (verification method, categories, dedup), control generator improvements, RAG client extensions

52 tests pass, frontend builds clean.

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

54 lines
2.1 KiB
SQL

-- Process Manager: Recurring compliance tasks with audit trail
-- Migration 052
CREATE TABLE compliance_process_tasks (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id UUID NOT NULL,
project_id UUID,
task_code VARCHAR(50) NOT NULL,
title VARCHAR(500) NOT NULL,
description TEXT,
category VARCHAR(50) NOT NULL
CHECK (category IN ('dsgvo','nis2','bsi','iso27001','ai_act','internal')),
priority VARCHAR(20) NOT NULL DEFAULT 'medium'
CHECK (priority IN ('critical','high','medium','low')),
frequency VARCHAR(20) NOT NULL DEFAULT 'yearly'
CHECK (frequency IN ('weekly','monthly','quarterly','semi_annual','yearly','once')),
assigned_to VARCHAR(255),
responsible_team VARCHAR(255),
linked_control_ids JSONB DEFAULT '[]',
linked_module VARCHAR(100),
last_completed_at TIMESTAMPTZ,
next_due_date DATE,
due_reminder_days INTEGER DEFAULT 14,
status VARCHAR(20) NOT NULL DEFAULT 'pending'
CHECK (status IN ('pending','in_progress','completed','overdue','skipped')),
completion_date TIMESTAMPTZ,
completion_result TEXT,
completion_evidence_id UUID,
follow_up_actions JSONB DEFAULT '[]',
is_seed BOOLEAN DEFAULT FALSE,
notes TEXT,
tags JSONB DEFAULT '[]',
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
UNIQUE (tenant_id, project_id, task_code)
);
CREATE TABLE compliance_process_task_history (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
task_id UUID NOT NULL REFERENCES compliance_process_tasks(id) ON DELETE CASCADE,
completed_by VARCHAR(255),
completed_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
result TEXT,
evidence_id UUID,
notes TEXT,
status VARCHAR(20) NOT NULL
);
CREATE INDEX idx_process_tasks_tenant ON compliance_process_tasks(tenant_id);
CREATE INDEX idx_process_tasks_status ON compliance_process_tasks(status);
CREATE INDEX idx_process_tasks_due ON compliance_process_tasks(next_due_date);
CREATE INDEX idx_process_tasks_category ON compliance_process_tasks(category);
CREATE INDEX idx_task_history_task ON compliance_process_task_history(task_id);