Skip to content

Fix transform() raising TransformError when renaming an indexed column - #823

Open
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-transform-rename-index
Open

Fix transform() raising TransformError when renaming an indexed column#823
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-transform-rename-index

Conversation

@ikatyal2110

@ikatyal2110 ikatyal2110 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

When a column that has an index is renamed via transform(rename=...), the index can be recreated using the new column name — the error was wrong to treat renaming the same as dropping. The fix updates the stored index SQL to reference the new column name instead of raising TransformError. Fixes #822.


Generated by Claude Code


📚 Documentation preview 📚: https://sqlite-utils--823.org.readthedocs.build/en/823/

Renaming a column that has an index is valid — the index should be
recreated using the new column name. Only dropping a column makes an
index unrecoverable and warrants the error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

transform(rename=...) raises TransformError when the renamed column has an index

2 participants