If you’re getting an error that reads “AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY” in SQLite, it appears that you’re trying to define a column as an AUTOINCREMENT
on a column that’s not defined as INTEGER PRIMARY KEY
.
SQLite only allows us to use AUTOINCREMENT
on INTEGER PRIMARY KEY
columns.
To address this issue, be sure to make the column an INTEGER PRIMARY KEY
if you need to use AUTOINCREMENT
on it.