Update _defaults["strict"] when necessary

Refs https://github.com/simonw/sqlite-utils/pull/788#issuecomment-4948505824
This commit is contained in:
Simon Willison 2026-07-11 16:31:58 -07:00
commit 5b9898ed9b
2 changed files with 15 additions and 0 deletions

View file

@ -2591,6 +2591,8 @@ class Table(Queryable):
self.db.execute("PRAGMA defer_foreign_keys=OFF;")
if should_disable_foreign_keys:
self.db.execute("PRAGMA foreign_keys=1;")
if strict is not None:
self._defaults["strict"] = strict
return self
def transform_sql(