From Dev.to
Why SQLite PRAGMA foreign_keys = ON Is Silently Ignored Inside an Active Transaction
A common SQLite bug in Python services is running PRAGMA foreign_keys = ON inside a connection setup helper after a transaction has already started. SQLite does not raise an error when you do this—it...
