-- Consent-Hash bekommt eine Ablauffrist (Pentest 57.7 MEDIUM). -- Public-Consent-Links liefen vorher nie ab – DSGVO-Risiko, weil ein -- weitergegebener Link Jahre später noch Einwilligungen erteilen konnte. -- 30 Tage Default; nach Ablauf liefert getCustomerByConsentHash null. -- Bestandsdaten ohne Ablaufzeit bekommen `NOW() + 30 Tage` als Frist, -- damit existierende, frisch versendete Links nicht sofort tot sind. -- -- IF NOT EXISTS macht den Re-Deploy auf Prod sicher. ALTER TABLE `Customer` ADD COLUMN IF NOT EXISTS `consentHashExpiresAt` DATETIME(3) NULL; UPDATE `Customer` SET `consentHashExpiresAt` = DATE_ADD(NOW(), INTERVAL 30 DAY) WHERE `consentHash` IS NOT NULL AND `consentHashExpiresAt` IS NULL;