feat(cmp): Phase 2 — script blocking + cookie tracking

Migration 108: scripts_blocked, scripts_released, cookies_set JSONB columns.
Backend models/schema/service/serializer/routes extended.
Admin detail modal shows released scripts and set cookies with categories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-11 22:52:26 +02:00
parent 051890c370
commit 397de741c1
8 changed files with 73 additions and 0 deletions
@@ -0,0 +1,18 @@
-- Migration 108: Script- und Cookie-Tracking fuer Banner-Consents
-- Erfasst welche Scripts blockiert/freigegeben und welche Cookies gesetzt wurden.
-- Alle Felder JSONB + nullable → backward-compatible.
-- Scripts die VOR Consent blockiert waren
ALTER TABLE compliance_banner_consents
ADD COLUMN IF NOT EXISTS scripts_blocked JSONB DEFAULT '[]'::jsonb;
-- [{"src": "https://www.googletagmanager.com/gtag/js", "category": "analytics"}]
-- Scripts die NACH Consent freigegeben wurden
ALTER TABLE compliance_banner_consents
ADD COLUMN IF NOT EXISTS scripts_released JSONB DEFAULT '[]'::jsonb;
-- [{"src": "https://www.googletagmanager.com/gtag/js", "category": "analytics"}]
-- Cookies die NACH Consent gesetzt wurden
ALTER TABLE compliance_banner_consents
ADD COLUMN IF NOT EXISTS cookies_set JSONB DEFAULT '[]'::jsonb;
-- [{"name": "_ga", "domain": ".breakpilot.ai", "expiry_days": 730, "category": "analytics"}]