TransformError() on strict=True if SQLite does not suppor strict

Refs https://github.com/simonw/sqlite-utils/pull/788#issuecomment-4948479356
This commit is contained in:
Simon Willison 2026-07-11 16:35:27 -07:00
commit b73e0e1021
5 changed files with 18 additions and 2 deletions

View file

@ -1772,6 +1772,8 @@ Pass ``strict=False`` to convert a strict table back to a regular non-strict tab
The default is ``strict=None``, which preserves the table's existing strict mode.
Passing ``strict=True`` raises ``sqlite_utils.db.TransformError`` if the available SQLite version does not support strict tables.
Converting to a strict table validates all existing rows as they are copied into the replacement table. If a value is incompatible with its declared column type, SQLite raises ``sqlite3.IntegrityError`` and the transformation is rolled back, leaving the original table and its data unchanged.
.. _python_api_transform_rename_columns: