Lokale DB-Kopie: Schema-Dump auf Migration 0003 aktualisieren

This commit is contained in:
2026-07-17 19:16:53 +02:00
parent 7d08e6fd81
commit d59b20d4ba
+22
View File
@@ -68,6 +68,21 @@ end;
$$; $$;
--
-- Name: handle_user_email_change(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION public.handle_user_email_change() RETURNS trigger
LANGUAGE plpgsql SECURITY DEFINER
SET search_path TO 'public'
AS $$
begin
update public.profiles set email = new.email where id = new.id;
return new;
end;
$$;
-- --
-- Name: touch_updated_at(); Type: FUNCTION; Schema: public; Owner: - -- Name: touch_updated_at(); Type: FUNCTION; Schema: public; Owner: -
-- --
@@ -376,6 +391,13 @@ ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
CREATE POLICY profiles_select_own_or_admin ON public.profiles FOR SELECT TO authenticated USING (((id = ( SELECT auth.uid() AS uid)) OR (public.app_role() = 'admin'::text))); CREATE POLICY profiles_select_own_or_admin ON public.profiles FOR SELECT TO authenticated USING (((id = ( SELECT auth.uid() AS uid)) OR (public.app_role() = 'admin'::text)));
--
-- Name: profiles profiles_update_own_name; Type: POLICY; Schema: public; Owner: -
--
CREATE POLICY profiles_update_own_name ON public.profiles FOR UPDATE TO authenticated USING ((id = ( SELECT auth.uid() AS uid))) WITH CHECK ((id = ( SELECT auth.uid() AS uid)));
-- --
-- Name: sections; Type: ROW SECURITY; Schema: public; Owner: - -- Name: sections; Type: ROW SECURITY; Schema: public; Owner: -
-- --