Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- These tuples can't be retrieved over any API (and also not inserted by any API) because we always add a `WHERE nid = ?` clause to the queries.
-- This DELETE statement is here to ensure that we don't run into problems where the `nid` column is not properly set. Should not happen if only the official API is used.
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT nid FROM networks);
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT id FROM networks);

CREATE TABLE keto_relation_tuples_with_fk
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-- These tuples can't be retrieved over any API (and also not inserted by any API) because we always add a `WHERE nid = ?` clause to the queries.
-- This DELETE statement is here to ensure that we don't run into problems where the `nid` column is not properly set. Should not happen if only the official API is used.
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT nid FROM networks);
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT id FROM networks);

ALTER TABLE keto_relation_tuples
ADD CONSTRAINT keto_relation_tuples_nid_fk
Expand Down