So I created a table
db:exec[[ CREATE TABLE teams (id INTEGER PRIMARY KEY, abv TEXT, name TEXT, win INTEGER, loss INTEGER, money INTEGER, support INTEGER CHECK (support \>= 0 and support \<= 100) , population INTEGER, previous\_records TEXT, previous\_championships TEXT, contract\_offers TEXT);]]
I update the table, for example:
local stmt= db:prepare[[UPDATE teams SET win = win + 1 WHERE id = ?]];
stmt:bind_values( t2_id);
stmt:step();
This works all fine on my computer, but for some reason, on all the Android phones, this statement doesn’t work. On Android, it doesn’t crash the app, it just doesn’t update the db table. After some experimenting I discovered that this statement was causing a problem:
CHECK (support \>= 0 and support \<= 100)
Once I removed it it the update statement began to work on Android. Does anyone know the cause between this SQlite discrepancy;.