Files
Speisekarte/db/migrations/0007_closed_days.sql
florian.wilde 2a2c5affd5 feat: Tage als geschlossen markierbar (Feiertage o. Ä.)
Im Wochenplan lässt sich pro Tag ein optionaler, mehrsprachiger
Schließungsgrund hinterlegen. Geschlossene Tage werden auf der
öffentlichen Speisekarte (Desktop + mobil) und im RSS-Feed als
"Geschlossen" statt mit Essenszeiten angezeigt, im Wochenplan bleibt
"Mahlzeit hinzufügen" für diesen Tag deaktiviert.
2026-07-20 12:35:00 +02:00

19 lines
811 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Kantine an einzelnen Tagen als geschlossen markieren (Feiertage o. Ä.),
-- mit optionalem, mehrsprachigem Grund. Ein Tag ohne Zeile hier gilt als
-- regulär geöffnet.
create table closed_days (
closed_date date primary key,
reason text,
created_at timestamptz not null default now()
);
-- Wert-Spalte heißt bewusst "name" (nicht "reason"), damit die generische
-- Zugriffsschicht in lib/db/translations.ts unverändert funktioniert –
-- dieselbe Konvention wie bei section_translations.name für sections.label.
create table closed_day_translations (
closed_date date not null references closed_days(closed_date) on delete cascade,
language_code text not null references languages(code) on delete cascade,
name text not null,
primary key (closed_date, language_code)
);