SQLite table constraints must be specified after all columns
Marking this one for future reference. TL;DR: You have to specify all the columns in your table, in a CREATE TABLE statement, before you specify table constraints like primary or foreign keys. SQLite gives the most useless error messages most of the time. Case in point: CREATE TABLE “Foo” ( “ColumnA” TEXT NOT NULL UNIQUE, “ColumnB”… Read more