All rules Rule SL029 · TY
SQLite · alpha
critical
TY · Type choices
free in the CLI — --engine=sqlite

AUTOINCREMENT on a WITHOUT ROWID table

Critical — SQLite refuses the statement, so the migration fails here.

What it catches

AUTOINCREMENT only exists for the rowid, and a WITHOUT ROWID table has none: SQLite refuses the CREATE TABLE with "AUTOINCREMENT not allowed on WITHOUT ROWID tables". The table is not created and the migration stops.

Fires on

CREATE TABLE sessions (id INTEGER PRIMARY KEY AUTOINCREMENT, token TEXT) WITHOUT ROWID;

Do this instead

Drop the keyword — or drop WITHOUT ROWID if a monotonically increasing integer key is the point of the table.

CREATE TABLE sessions (id INTEGER PRIMARY KEY, token TEXT);
Catch this before it ships

SQLite support is in alpha: this rule runs locally in the free CLI, static only, and not in the hosted service yet: npx bolvrk check migration.sql --engine=sqlite