-- ==================================================================== -- 0056_brand_font — eigene Marken-Schriftart (Branding) -- ==================================================================== -- Der Mandant kann eine eigene Schrift hinterlegen (Google-Font-Name, -- kuratierte Auswahl oder Datei-Upload). DSGVO: die Font-Dateien werden -- SELF-HOSTED (im branding-assets-Bucket), NICHT von Google's CDN geladen. -- Angewandt auf die öffentlichen Flächen (--font-sans-Override + @font-face) -- und das QR-Wallpaper. alter table public.site_settings add column if not exists brand_font_family text, -- CSS/SVG-Family, z.B. "Inter" add column if not exists brand_font_regular_url text, -- self-hosted TTF (400) add column if not exists brand_font_bold_url text, -- self-hosted TTF (700) add column if not exists brand_font_source text; -- 'google' | 'upload' -- anon-Spalten-Grant neu setzen (Muster 0043/0055): die Font-Spalten sind -- KEINE Geheimnisse — die öffentliche Karte liest site_settings via anon und -- braucht sie. Also: Block-Liste = bisherige Geheimnisse (bleiben gesperrt), -- die neuen brand_font_*-Spalten werden dadurch automatisch anon-lesbar. revoke all on public.site_settings from anon; do $$ declare v_cols text; begin select string_agg(quote_ident(column_name), ', ') into v_cols from information_schema.columns where table_schema = 'public' and table_name = 'site_settings' and column_name not in ( 'ai_anthropic_key', 'ai_openai_key', 'ai_openrouter_key', 'apple_pass_cert_p12', 'apple_pass_passphrase', 'apple_pass_type_id', 'google_wallet_service_account_json', 'phone_api_token', 'phone_lookup_token', 'phone_webhook_secret', 'license_key', 'smtp_host', 'smtp_port', 'smtp_secure', 'smtp_user', 'smtp_pass', 'smtp_from_email', 'smtp_from_name' ); execute 'grant select (' || v_cols || ') on public.site_settings to anon'; end $$;