SQLite · alpha
warning
TX · Transactions
free in the CLI — --engine=sqlite
PRAGMA that is a no-op inside a transaction
Warning — it works, but holds the single write lock or breaks the previous release.
What it catches
PRAGMA foreign_keys and PRAGMA journal_mode do nothing while a transaction is open — SQLite does not error, it silently leaves the setting as it was. A rebuild that switches foreign keys off after BEGIN runs with them on, and everything SL009 warns about applies.
Fires on
BEGIN;
PRAGMA foreign_keys = OFF;
DROP TABLE orders;
COMMIT;Do this instead
Issue the pragma before BEGIN (and re-enable after COMMIT). If the migration runner wraps every file in a transaction, the pragma has to be set by the runner itself.
PRAGMA foreign_keys = OFF;
BEGIN;
DROP TABLE orders;
COMMIT;
PRAGMA foreign_keys = ON;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