mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-08 01:24:20 +02:00
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 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| cli.py | ||
| db.py | ||
| hookspecs.py | ||
| migrations.py | ||
| plugins.py | ||
| py.typed | ||
| recipes.py | ||
| utils.py | ||