Your table definition has incorrect syntax. Doing it that way gives you a column called <code>id TEXT</code> which has no affinity. The double quotes should not be there at all: <code>id TEXT</code> If you must use double quotes for your column names then they should be around the column name, not the affinity: <code>"id" TEXT</code> and you should use them everywhere you refer to a column name.