Skip to content

Commit 45bc434

Browse files
committed
fix: Fix old migrations for Keto 0.8, column nit is not exists in table network
1 parent 6f7bbe2 commit 45bc434

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/persistence/sql/migrations/sql/20220217152313000000_nid_fk.sqlite.up.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- 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.
22
-- 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.
3-
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT nid FROM networks);
3+
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT id FROM networks);
44

55
CREATE TABLE keto_relation_tuples_with_fk
66
(

internal/persistence/sql/migrations/sql/20220217152313000000_nid_fk.up.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- 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.
22
-- 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.
3-
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT nid FROM networks);
3+
DELETE FROM keto_relation_tuples WHERE nid NOT IN (SELECT id FROM networks);
44

55
ALTER TABLE keto_relation_tuples
66
ADD CONSTRAINT keto_relation_tuples_nid_fk

0 commit comments

Comments
 (0)