mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-24 18:04:32 +02:00
When renaming columns that are referenced by foreign keys in other
tables, the --update-incoming-fks flag will automatically update
those FK constraints.
Example:
sqlite-utils transform mydb.db authors \
--rename id author_pk \
--update-incoming-fks
This will rename the 'id' column to 'author_pk' and also update any
foreign key constraints in other tables (e.g., books.author_id)
that reference the renamed column.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| cli.py | ||
| db.py | ||
| hookspecs.py | ||
| plugins.py | ||
| py.typed | ||
| recipes.py | ||
| utils.py | ||