-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made sure that
cascade on delete
is set on the correct fields
- Loading branch information
1 parent
ec353a9
commit 34c819c
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
server/main-api/migrations/20240509001948_added-cascading-deletions.down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Add down migration script here | ||
alter table en drop constraint en_key_fkey; | ||
alter table en add foreign key (key) references de; | ||
|
||
alter table calendar drop constraint calendar_room_code_fkey; | ||
alter table calendar add foreign key (room_code) references en; | ||
|
||
alter table aliases drop constraint aliases_key_fkey; | ||
alter table aliases add foreign key (key) references de; |
9 changes: 9 additions & 0 deletions
9
server/main-api/migrations/20240509001948_added-cascading-deletions.up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- Add up migration script here | ||
alter table en drop constraint en_key_fkey; | ||
alter table en add foreign key (key) references de on update cascade on delete cascade; | ||
|
||
alter table calendar drop constraint calendar_room_code_fkey; | ||
alter table calendar add foreign key (room_code) references en on update cascade on delete cascade; | ||
|
||
alter table aliases drop constraint aliases_key_fkey; | ||
alter table aliases add foreign key (key) references de on update cascade on delete cascade; |