Skip to content

v2.18.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 16:13
· 44 commits to main since this release
Immutable release. Only release title and notes can be modified.
5661cf8

Fixed

  • A fresh migrate could 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 with relation "…" does not exist where an incrementally migrated one never did. The makemigrations override now writes the dependency onto the rename or delete it has just built (not the leaf --update rewrites), and makemigrations --check names 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 --check red until the named dependency is added to the rename or delete migration.
  • A model moved between apps (SeparateDatabaseAndState renaming 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 plain CREATE. 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 at COMMIT for a GenericRelation child (#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() asks guitars.E005 of 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). _OwnedScan keeps each root's closure and narrows it for a shrinking candidate set and for a spared target asked again next round; a single WITH RECURSIVE cannot express the shrinking fixpoint, PostgreSQL refusing the recursion under NOT EXISTS. The delta-only rounds shipped in 2.14.3.