Skip to content

Commit c590095

Browse files
committed
Remove delete on cascade of nodes when relations are removed.
1 parent f48dfc8 commit c590095

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/database/mariadb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ CREATE TABLE IF NOT EXISTS relations (
7979
source_id INT NOT NULL,
8080
8181
CONSTRAINT pk_relation PRIMARY KEY (id),
82-
CONSTRAINT fk_from FOREIGN KEY (from_id) REFERENCES assets (id) ON DELETE CASCADE,
83-
CONSTRAINT fk_to FOREIGN KEY (to_id) REFERENCES assets (id) ON DELETE CASCADE,
82+
CONSTRAINT fk_from FOREIGN KEY (from_id) REFERENCES assets (id),
83+
CONSTRAINT fk_to FOREIGN KEY (to_id) REFERENCES assets (id),
8484
CONSTRAINT fk_relation_source FOREIGN KEY (source_id) REFERENCES sources (id),
8585
8686
INDEX full_relation_type_from_to_idx (type, from_id, to_id),

0 commit comments

Comments
 (0)