-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(endpoints): delete extension on cascade
Deleting was impossible after adding extension mapping support since foreign keys were referencing the endpoint. The database structure was updated to handle such cases and delete extensions on CASCADE. The implementation was also changed to use endpoint sid instead of ID.
- Loading branch information
1 parent
fa3058b
commit 1737a38
Showing
5 changed files
with
34 additions
and
18 deletions.
There are no files selected for viewing
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,14 @@ | ||
-- migrate:up | ||
ALTER TABLE ery_extension DROP CONSTRAINT ery_extension_endpoint_id_fkey; | ||
|
||
ALTER TABLE | ||
ery_extension | ||
ADD CONSTRAINT | ||
ry_extension_endpoint_id_fkey | ||
FOREIGN KEY | ||
(endpoint_id) | ||
REFERENCES | ||
ps_endpoints(sid) | ||
ON DELETE CASCADE; | ||
|
||
-- migrate:down |
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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