sqlite-utils/sqlite_utils
ikatyal21 7c182f5afa
Fix transform() corrupting ANY columns on STRICT tables to REAL
column_affinity() fell through all type checks for the SQLite-specific
ANY column type and returned float, which then mapped to REAL in
COLUMN_TYPE_MAPPING. This caused transform() on a STRICT table with
ANY columns to either crash with IntegrityError (when existing rows
held non-numeric values) or silently change the column type from ANY
to REAL.

Add ANY as an explicit case in column_affinity() so it passes through
as the string "ANY", and register "ANY"/"any" in COLUMN_TYPE_MAPPING
so create_table_sql() emits the correct column type.

Fixes #790
2026-07-31 15:58:59 +00:00
..
__init__.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
__main__.py Support 'python -m sqlite_utils', closes #368 2022-01-08 18:33:22 -08:00
cli.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
db.py Fix transform() corrupting ANY columns on STRICT tables to REAL 2026-07-31 15:58:59 +00:00
hookspecs.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
migrations.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
plugins.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
py.typed py.typed file so mypy picks up the types, closes #331 2021-11-14 15:21:04 -08:00
recipes.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
utils.py Fix transform() corrupting ANY columns on STRICT tables to REAL 2026-07-31 15:58:59 +00:00