Lokale PostgreSQL-Kopie: Dump nach Migration 0006 aktualisiert
This commit is contained in:
@@ -22,9 +22,6 @@ SET row_security = off;
|
||||
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
|
||||
--
|
||||
|
||||
-- Das "public"-Schema existiert im offiziellen postgres-Image bereits;
|
||||
-- CREATE SCHEMA würde dort mit ON_ERROR_STOP=1 das komplette Init-Skript
|
||||
-- abbrechen.
|
||||
CREATE SCHEMA IF NOT EXISTS public;
|
||||
|
||||
|
||||
@@ -191,7 +188,7 @@ CREATE TABLE public.profiles (
|
||||
--
|
||||
|
||||
CREATE TABLE public.sections (
|
||||
key text NOT NULL,
|
||||
key text DEFAULT (gen_random_uuid())::text NOT NULL,
|
||||
label text NOT NULL,
|
||||
time_range text NOT NULL,
|
||||
sort integer NOT NULL,
|
||||
@@ -320,7 +317,7 @@ ALTER TABLE ONLY public.menu_entries
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY public.menu_entries
|
||||
ADD CONSTRAINT menu_entries_section_key_fkey FOREIGN KEY (section_key) REFERENCES public.sections(key);
|
||||
ADD CONSTRAINT menu_entries_section_key_fkey FOREIGN KEY (section_key) REFERENCES public.sections(key) ON DELETE CASCADE;
|
||||
|
||||
|
||||
--
|
||||
@@ -471,6 +468,13 @@ ALTER TABLE public.sections ENABLE ROW LEVEL SECURITY;
|
||||
CREATE POLICY sections_public_read ON public.sections FOR SELECT TO authenticated, anon USING (true);
|
||||
|
||||
|
||||
--
|
||||
-- Name: sections sections_staff_write; Type: POLICY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
CREATE POLICY sections_staff_write ON public.sections TO authenticated USING ((public.app_role() = ANY (ARRAY['staff'::text, 'admin'::text]))) WITH CHECK ((public.app_role() = ANY (ARRAY['staff'::text, 'admin'::text])));
|
||||
|
||||
|
||||
--
|
||||
-- Name: settings; Type: ROW SECURITY; Schema: public; Owner: -
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user