Commit 1def082fa5f29a20232b05b3604e93fbfecac100

Authored by David RENÉ
1 parent 43d0c386

[!] in alter_table fix the pragma foreign_keys with OFF and ON instead of 0 and 1 which not working

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
database/alter_table.anubis
@@ -222,7 +222,7 @@ public define Maybe(One) @@ -222,7 +222,7 @@ public define Maybe(One)
222 }, 222 },
223 true then 223 true then
224 with tempNameTable = tableName + "_temp", 224 with tempNameTable = tableName + "_temp",
225 - forget(sql_query(db, "PRAGMA foreign_keys = 0;")); 225 + forget(sql_query(db, "PRAGMA foreign_keys = OFF;"));
226 forget(sql_query(db, "DROP TABLE " + tempNameTable)); 226 forget(sql_query(db, "DROP TABLE " + tempNameTable));
227 with result = if my_sql_query(db, "CREATE TEMP TABLE " + tempNameTable + " AS SELECT * from " + fullTableName, log) is failure then failure else 227 with result = if my_sql_query(db, "CREATE TEMP TABLE " + tempNameTable + " AS SELECT * from " + fullTableName, log) is failure then failure else
228 if my_sql_query(db, "DROP TABLE " + fullTableName, log) is failure then failure else 228 if my_sql_query(db, "DROP TABLE " + fullTableName, log) is failure then failure else
@@ -247,7 +247,7 @@ public define Maybe(One) @@ -247,7 +247,7 @@ public define Maybe(One)
247 } 247 }
248 }, 248 },
249 249
250 - forget(sql_query(db, "PRAGMA foreign_keys = 1;")); 250 + forget(sql_query(db, "PRAGMA foreign_keys = ON;"));
251 result 251 result
252 } 252 }
253 else 253 else