Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 231
M28 Avatar asked Apr 25 '26 03:04

M28


1 Answers

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

like image 122
Ignacio Vazquez-Abrams Avatar answered Apr 28 '26 21:04

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!