File downloading

This commit is contained in:
Magnus Åhall 2023-06-22 17:42:34 +02:00
parent 86cedf9531
commit eaf5e2fb95
3 changed files with 14 additions and 8 deletions

5
sql/0006.sql Normal file
View file

@ -0,0 +1,5 @@
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;