All rules Rule SL034 · TS
SQLite · alpha
note
TS · Table settings
free in the CLI — --engine=sqlite

Journal mode set to something other than WAL

Note — this works, but it is a documented trap or a cost the author may not have meant.

What it catches

journal_mode is stored in the database file: a migration that sets DELETE, TRUNCATE or PERSIST changes every future connection, not just the runner's. In those modes a writer blocks readers and readers block the writer for the length of each transaction; WAL lets readers proceed during a write and is the mode the application almost certainly wants.

Fires on

PRAGMA journal_mode = DELETE;

Do this instead

Set WAL once, from the application's connection setup or a deliberate operational step — and if a migration must set it, set WAL.

PRAGMA journal_mode = WAL;
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