-- ─── Marketing-consent provenance on users (D2) ───────────────────────────── -- `marketing_consent` is a bare boolean — the GDPR requires demonstrable consent -- (when and how it was given). Add a timestamp and a source so consent can be -- proven and audited. Nullable: existing rows have unknown provenance. ALTER TABLE `users` ADD COLUMN IF NOT EXISTS `marketing_consent_at` DATETIME DEFAULT NULL AFTER `marketing_consent`, ADD COLUMN IF NOT EXISTS `marketing_consent_source` VARCHAR(60) DEFAULT NULL AFTER `marketing_consent_at`;