Bug hunt wrapped up!
These were all pretty far out there on the edge of edge-cases. Things are looking solid all around.
- Fix a compound select (
UNION/INTERSECT/EXCEPT) used as a correlated subquery emitting a phantom alias for the correlated outer table in every branch but the left-most, producing invalid SQL (e.g.no such column: t4.id). The right-hand branch renders in a fresh alias scope that no longer resolved the outer source's existing alias, it now inherits the enclosing scope's aliases while still assigning fresh aliases to its own sources. - Fix full-text search
weightspassed as adictbeing mis-applied to the wrong columns. For FTS3/4 the implicitdocidprimary-key was included when building the weight list, shifting every column by one (raisingIndexErrorwith the Python ranking UDF, silently mis-scoring with the Cython one), for FTS5,UNINDEXEDcolumns were skipped even thoughbm25()weights are positional across all columns. The list form ofweightswas unaffected. - Fix
.cte()clearing the source query's CTE list in place: converting a query that carried awith_cte(...)clause into a CTE stripped the clause from that query, so reusing it afterward referenced an undeclared CTE. The query is now cloned before its CTE list is reset. - Fix
Table.select()with no arguments on aTabledeclared without columns emitting an empty projection (SELECT FROM ...) instead ofSELECT *. - Fix
Table.insert(select_query)with nocolumnsraisingTypeErrorinstead of renderingINSERT INTO t SELECT .... - Fix the MySQL migrator dropping a foreign key's
ON DELETE/ON UPDATEaction whenadd_not_null()orrename_column()rebuilds the constraint, silently downgrading e.g.CASCADEtoRESTRICT. The actions reported byget_foreign_keys()are now carried through to the rebuilt constraint. - Fix the legacy
postgres_extJSONcontains/contained_by/concatraisingAttributeError, andremove()silently rewriting the entire column, when applied to a.path()-chained lookup (e.g.Model.data['a'].path('b')). All four now resolve the root field and full path via_resolve_root(), matching the siblingset/replace/insert/append/updatemutators. - Correct the
postgres_ext.JSONFielddocs: thejson-column field does not support thejsonb-based mutation/concatenation builders (they raiseProgrammingError), so the misleading "Postgres casts implicitly" claim was removed and new code is steered to the built-inJSONField. - Fix the SQLite migrator treating a bare table-level
UNIQUE (a, b)constraint as a column when rebuilding a table (add_not_null,drop_column, ...), raisingno column named UNIQUE;uniqueis now recognized as a constraint. - Fix the SQLite migrator's table rebuild corrupting the
CREATE TABLEkeywords for a table whose name is a case-insensitive substring of them (e.g.ab,t,tab) -- the table-name substitution is now anchored to the trailing name token.