Repository navigation
v2.18.0
·
44 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- A fresh
migratecould run a rename or delete of a table before an older enforcement migration naming it (#61, ADR 0036). The SQL of a cascade rule or an MTI redirect rule names a table; nothing ordered it before a later migration of another app that renames that table away or drops it, so a fresh database failed withrelation "…" does not existwhere an incrementally migrated one never did. Themakemigrationsoverride now writes the dependency onto the rename or delete it has just built (not the leaf--updaterewrites), andmakemigrations --checknames any pair already on disk with the migration to edit and the tuple to paste. Column-level changes are not read. Upgrade step: a history already holding such a pair turns--checkred until the named dependency is added to the rename or delete migration. - A model moved between apps (
SeparateDatabaseAndStaterenaming the table on its database side and deleting the model on its state side) is read as the rename it is (#66): its coverage follows the table, instead of the new name reading as uncovered and colliding on the plainCREATE. What the destination's app filed under the new name is kept whichever app is scanned first, and what another app filed under the old name is carried to the end of its chain once the scan is done, through later renames or moves, before any retirement is settled; a rename chain that began in another app is joined to this one's, so the old rule is dropped rather than left live (ADR 0037). Known limits: a model moved back keeps a stale rule name, and the migration doing the move's database half has to be ordered before the enforcement naming its table by hand. hard_delete()aborted atCOMMITfor aGenericRelationchild (#76). Sparing now reads what points at a generic child, as it does a cascade child's, and spares the target instead.- A tenant lookup spelled as the column (
tenanted_manager(label='label_id')) read as an ancestor's field: the policy joined the table to itself and no autofill trigger was written. It is the model's own field now. Upgrade step: such a project regenerates its tenant policy (makemigrations). - The retirement reverse of a revive trigger refuses, rather than rebuilds, a body naming
$$, as the forward path has always skipped it. - Instance
hard_delete()asksguitars.E005of every model it can seed from before Phase 1, owned targets included; it used to meet one mid-walk, after signals had fired.
Changed
- The owned fixpoint reads each cascade closure once (#60).
_OwnedScankeeps each root's closure and narrows it for a shrinking candidate set and for a spared target asked again next round; a singleWITH RECURSIVEcannot express the shrinking fixpoint, PostgreSQL refusing the recursion underNOT EXISTS. The delta-only rounds shipped in 2.14.3.