Skip to content

Commit

Permalink
[ADD] - passet på cascading deletes
Browse files Browse the repository at this point in the history
  • Loading branch information
tofiksa committed Aug 2, 2024
1 parent 3708cbc commit 8d8c0a9
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Modify foreign key constraint on score table to add CASCADE DELETE
ALTER TABLE josefushighscore."score"
DROP CONSTRAINT IF EXISTS fk_score_game_id;

ALTER TABLE josefushighscore."score"
ADD CONSTRAINT fk_score_game_id
FOREIGN KEY (game_id)
REFERENCES josefushighscore.game(game_id)
ON DELETE CASCADE;

0 comments on commit 8d8c0a9

Please sign in to comment.