From 1def082fa5f29a20232b05b3604e93fbfecac100 Mon Sep 17 00:00:00 2001 From: totoro Date: Sat, 16 Oct 2021 20:55:05 +0200 Subject: [PATCH] [!] in alter_table fix the pragma foreign_keys with OFF and ON instead of 0 and 1 which not working --- database/alter_table.anubis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/database/alter_table.anubis b/database/alter_table.anubis index 0e0d08e..4065876 100644 --- a/database/alter_table.anubis +++ b/database/alter_table.anubis @@ -222,7 +222,7 @@ public define Maybe(One) }, true then with tempNameTable = tableName + "_temp", - forget(sql_query(db, "PRAGMA foreign_keys = 0;")); + forget(sql_query(db, "PRAGMA foreign_keys = OFF;")); forget(sql_query(db, "DROP TABLE " + tempNameTable)); with result = if my_sql_query(db, "CREATE TEMP TABLE " + tempNameTable + " AS SELECT * from " + fullTableName, log) is failure then failure else if my_sql_query(db, "DROP TABLE " + fullTableName, log) is failure then failure else @@ -247,7 +247,7 @@ public define Maybe(One) } }, - forget(sql_query(db, "PRAGMA foreign_keys = 1;")); + forget(sql_query(db, "PRAGMA foreign_keys = ON;")); result } else -- libgit2 0.21.4