sqlite-utils 4.2

Simon Willison's Weblog Simon Willison's Weblog

Release: https://github.com/simonw/sqlite-utils/releases/tag/4.2">sqlite-utils 4.2


Lots of improvements in this one relating to the https://sqlite-utils.datasette.io/en/stable/python-api.html#transforming-a-table">table.transform() feature, which adds support for complex alter table operations by creating a fresh table, copying across the data and then dropping and replacing the old one.


transform() now preserves a much larger array of edge-case schema definitions, including check constraints, unique constraints and even comments describing the columns.


There are also https://sqlite-utils.datasette.io/en/stable/python-api.html#checks">new introspection properties for check constraints, and a whole lot of other smaller changes.


Includes contributions from https://github.com/bunlongheng">Bunlong Heng, https://github.com/ethanhawkes-gif">ethanhawkes-gif, https://github.com/RamiNoodle733">Rami Abdelrazzaq, https://github.com/nyxst4ck">nyxst4ck, and https://github.com/ikatyal2110">ikatyal2110.


(It later turned out 4.2 had https://github.com/simonw/sqlite-utils/issues/842">a crashing bug, fixed in https://sqlite-utils.datasette.io/en/stable/changelog.html#v4-2-1">4.2.1.)




Tags: https://simonwillison.net/tags/releases">releases, https://simonwillison.net/tags/sqlite">sqlite, https://simonwillison.net/tags/sqlite-utils">sqlite-utils

Read full article at Simon Willison's Weblog →