Search code examples
sqlitecreate-table

What's wrong with this query?


CREATE TABLE IF NOT EXISTS fw_users (id INT(64) NOT NULL PRIMARY KEY AUTOINCREMENT, auth CHAR(64) UNIQUE, money INT(32) DEFAULT '0', unlocks VARCHAR(8000))

I can't see any error in it, but SQLite throws an error:

Query failed! AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY

It doesn't make sense, id IS an integer


Solution

  • INT(64) isn't close enough; it must be INTEGER.