From 3ace435e4a93f7d3f0e64eb85cab296d9ab387fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Palma?= Date: Fri, 20 Sep 2024 10:27:32 +0100 Subject: [PATCH] chore: add foreign key constraint to link_id of slot_professor --- postgres/sql/00_schema_postgres.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/postgres/sql/00_schema_postgres.sql b/postgres/sql/00_schema_postgres.sql index d71bf63..8ec2712 100644 --- a/postgres/sql/00_schema_postgres.sql +++ b/postgres/sql/00_schema_postgres.sql @@ -322,7 +322,7 @@ ALTER TABLE ONLY "public"."slot" -- ALTER TABLE ONLY "public"."slot_professor" - ADD CONSTRAINT "slot_professor_pkey" PRIMARY KEY ("slot_id", "professor_id", "link_id"); + ADD CONSTRAINT "slot_professor_pkey" PRIMARY KEY ("slot_id", "professor_id"); -- @@ -478,6 +478,10 @@ ALTER TABLE ONLY "public"."slot_professor" ALTER TABLE ONLY "public"."slot_professor" ADD CONSTRAINT "slot_professor_slot_id_ddc4b9c2_fk_slot_id" FOREIGN KEY ("slot_id") REFERENCES "public"."slot"("id") DEFERRABLE INITIALLY DEFERRED; +ALTER TABLE ONLY "public"."slot_professor" + ADD CONSTRAINT "slot_professor_professor_link_id" FOREIGN KEY ("link_id") REFERENCES "public"."professor_link"("id") DEFERRABLE INITIALLY DEFERRED; + + -- Completed on 2024-08-13 22:21:25 UTC