Skip to content

Commit

Permalink
chore: add foreign key constraint to link_id of slot_professor
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Sep 20, 2024
1 parent 9a5ac39 commit 3ace435
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion postgres/sql/00_schema_postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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");


--
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 3ace435

Please sign in to comment.