1
0
Fork 0
fahrPool/supabase/migrations/20261012090400_firmen_logo_...

9 lines
415 B
SQL

-- Der LIKE-Check aus 20261012090300 liess "<id>/../<fremde-id>/logo-1.png" zu.
-- Der Pfad muss exakt dem Muster aus logoPfad() (web/lib/firma/logo.ts) entsprechen.
alter table public.firmen
drop constraint firmen_logo_pfad_eigener_ordner;
alter table public.firmen
add constraint firmen_logo_pfad_eigener_ordner
check (logo_pfad is null or logo_pfad ~ ('^' || id::text || '/logo-[0-9]+\.(png|jpg|svg)$'));