Repository navigation
v2.17.0
·
50 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Added
guitars.E005refuses an MTI child that declares a primary key of its own beside its parent link (#64, ADR 0034). Every join the kit writes from such a child up to an ancestor holding a kit column or tenant dimension read its key as that link: aDELETEof the child archived an unrelated ancestor row, the parent_updated_attrigger and owned arms touched or matched one, and a tenant policy's owner join matched another tenant's row.manage.py checkandmigratenow stop on it, with a hint: drop the explicit key, or make the model its own with a foreign key to its parent. The generator re-asks the question for a project that skips checks, and writes no MTI redirect rule, parent trigger, owned arm, owner-join policy or cascade rule into such a model, naming E005 in a note except for the owned arm, which is dropped quietly;hard_delete(), which runs no check, raisesImproperlyConfiguredfor it, for its whole tree in the queryset form and for any such child the instance walk reaches, where it removed an unrelated ancestor row. A tenanted model with no kit column is covered too. A child holding its own column or tenant dimension is not: it joins nothing.
Fixed
- A
CASCADEkey throughto_fieldmatched on the owner's primary key (#59, ADR 0035). With an integer column the rule archived the wrong rows (a seat holdingnumber2 matched the ticket whose pk was 2); with a char columnCREATE RULEcomparedvarcharwithbigintandmigratefailed. The cascade rule, its revive arm and the self-cascade trigger now match children on theto_fieldcolumn, pairing a row across a statement on the pk. A key into the primary key renders as it did: nothing re-emits for it. A column declared on a descendant, below the table holding_deleted_at, is a column the rule cannot read, and is refused with a note instead. soft_delete()and the.delete()fast path take ato_fieldkey now: it was a refusal, and a decline, while the rule matched the wrong rows.
Changed
- Upgrade step. A project with a
to_fieldcascade key regenerates one enforcement migration (makemigrations);--checkis red until it does. A project with the E005 shape cannot start until it restructures the model.