sqlite-utils/sqlite_utils
Simon Willison 8f264e8d2a transform() now works for tables referenced by views
Bracket the ALTER TABLE ... RENAME TO statements emitted by
transform_sql() with PRAGMA legacy_alter_table=ON/OFF. Since SQLite
3.25 the rename would otherwise rewrite references in every view
definition, which failed with "no such table" when a view referenced
the just-dropped table, and with keep_table= silently repointed
dependent views at the frozen backup table.

View definitions are now left byte-for-byte unchanged by a transform.

Closes #831

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 22:08:37 -07: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 transform() now works for tables referenced by views 2026-08-06 22:08:37 -07: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 Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00