sqlite-utils 4.2 的 transform() 升级后能保住更多表结构细节,比如约束和注释,改表不用再担心丢失定义。不过记得用 4.2.1,4.2 有崩溃坑。
sqlite-utils 4.2 改进了 table.transform() 功能,通过新建临时表复制数据再替换原表的方式支持复杂 ALTER TABLE 操作。新版本能保留 check constraints、unique constraints 和列注释等边缘 schema 定义,并新增了 check constraints 的内省属性。该版本包含 Bunlong Heng、ethanhawkes-gif 等 5 位贡献者的代码。发布后 4.2 被发现存在崩溃 bug,已在 4.2.1 中修复。
sqlite-utils 4.2
Release: sqlite-utils 4.2 Lots of improvements in this one relating to the 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 new introspection properties for check constraints, and a whole lot of other smaller changes. Includes contributions from Bunlong Heng , ethanhawkes-gif , Rami Abdelrazzaq , nyxst4ck , and ikatyal2110 . (It later turned out 4.2 had a crashing bug , fixed in 4.2.1 .) Tags: releases , sqlite , sqlite-utils