Skip to content
Snippets Groups Projects
Commit bf4f5550 authored by Cristiano Urban's avatar Cristiano Urban
Browse files

Added 'ON DELETE CASCADE' instruction.

parent a85dd224
No related branches found
No related tags found
No related merge requests found
Pipeline #1087 passed
......@@ -90,7 +90,7 @@ CREATE TABLE node (
-- storage_id VARCHAR,
protocols TEXT[] default NULL,
PRIMARY KEY (node_id),
FOREIGN KEY (location_id) REFERENCES location (location_id)
FOREIGN KEY (location_id) REFERENCES location (location_id) ON DELETE CASCADE
);
......@@ -132,7 +132,7 @@ CREATE TABLE deleted_node (
-- add a deleted_on timestamp to keep track
deleted_on TIMESTAMP default CURRENT_TIMESTAMP,
PRIMARY KEY (node_id),
FOREIGN KEY (location_id) REFERENCES location (location_id)
FOREIGN KEY (location_id) REFERENCES location (location_id) ON DELETE CASCADE
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment