Skip to content

Commit

Permalink
fix: Fix old migrations for Keto 0.8, column nit is not exists in tab…
Browse files Browse the repository at this point in the history
…le network
  • Loading branch information
DarkDrim committed Aug 27, 2024
1 parent 6f7bbe2 commit 45bc434
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 45bc434

Please sign in to comment.