mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-23 09:24:31 +02:00
PRAGMA table_info sets is_pk to the 1-based position of each column within the PRIMARY KEY, which can differ from table column order. table.pks previously returned table column order, so an implicit compound FOREIGN KEY ... REFERENCES other was introspected with its referenced columns inverted, and transform() baked that inverted order into the rewritten schema - failing with IntegrityError on valid data, or silently reversing the constraint with foreign keys off. table.pks, compound foreign key guessing (create, add_foreign_key) and transform() now all use declaration order, and transform() no longer reorders a compound PRIMARY KEY (b, a) into table column order. Refs https://github.com/simonw/sqlite-utils/issues/769#issuecomment-4900034150 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| _static/js | ||
| _templates | ||
| .gitignore | ||
| changelog.rst | ||
| cli-reference.rst | ||
| cli.rst | ||
| codespell-ignore-words.txt | ||
| conf.py | ||
| contributing.rst | ||
| index.rst | ||
| installation.rst | ||
| Makefile | ||
| migrations.rst | ||
| plugins.rst | ||
| python-api.rst | ||
| reference.rst | ||
| tutorial.ipynb | ||
| upgrading.rst | ||