-- Granulare Kontrolle, welche Felder der Trusted-Link zusätzlich freischaltet. -- Array aus String-Tokens wie 'mobile', 'linkedin', 'xing'. Leer = wie vorher -- (nur implizit Mobilnummer, wird in der Migration unten auf 'mobile' gehoben, -- damit bestehende Trusted-Links ihre bisherige Wirkung behalten). alter table public.employees add column if not exists trusted_reveal text[] not null default '{}'; -- Bestehende aktive Tokens: als "zeigt Mobilnummer" markieren, damit das -- Verhalten vor dem Deploy identisch bleibt. update public.employees set trusted_reveal = array['mobile'] where trusted_token is not null and coalesce(array_length(trusted_reveal, 1), 0) = 0;