mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 01:44:31 +02:00
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:
parent
5b9898ed9b
commit
b73e0e1021
5 changed files with 18 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue