Notes2/sql/00006.sql
Magnus Åhall 9a164b984a wip
2024-11-29 09:15:42 +01:00

6 lines
382 B
SQL

ALTER TABLE public.file DROP CONSTRAINT file_node_fk;
ALTER TABLE public.file ADD CONSTRAINT file_node_fk FOREIGN KEY (node_id) REFERENCES public.node(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE public.file DROP CONSTRAINT file_fk;
ALTER TABLE public.file ADD CONSTRAINT file_user_fk FOREIGN KEY (user_id) REFERENCES public."user"(id) ON DELETE CASCADE ON UPDATE CASCADE;