22 lines
1.0 KiB
SQL
22 lines
1.0 KiB
SQL
-- ====================================================================
|
|
-- 0069_theme_default — Standard-Darstellung je Mandant
|
|
-- ====================================================================
|
|
-- Was Portal und Karte zeigen, solange jemand im Portal unter „Darstellung"
|
|
-- nichts gewählt hat: 'light' (Vorgabe), 'dark' oder 'system' (folgt der
|
|
-- Geräteeinstellung). Eine eigene Wahl (Cookie tv_theme) geht immer vor.
|
|
-- Additiv; anon-Lesezugriff nur auf diese Spalte (die Karte liest anon).
|
|
|
|
alter table public.site_settings
|
|
add column if not exists theme_default text not null default 'light';
|
|
|
|
alter table public.site_settings
|
|
drop constraint if exists site_settings_theme_default_check;
|
|
alter table public.site_settings
|
|
add constraint site_settings_theme_default_check
|
|
check (theme_default in ('light', 'dark', 'system'));
|
|
|
|
comment on column public.site_settings.theme_default is
|
|
'Standard-Darstellung von Portal und Karte: light | dark | system.';
|
|
|
|
grant select (theme_default) on public.site_settings to anon;
|