Repository navigation
v2.16.0
·
58 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Changed
- One revive trigger per owner table (#70, ADR 0033). Since 2.11.0 every cascade key carried its own statement-level revive trigger on the owner table, each running a full
UPDATE … FROMjoin over the transition tables on everyUPDATEof that table: one consumer table had 16. The generator now emits one trigger and function per owner,soft_delete_revive_on_<owner>, with every key's revive as an arm, joined forms included, behind one test of whether the statement revived a row at all. On 16 keysscripts/bench_revive.pymeasures +0.245 ms anUPDATEper key against +0.047 ms per owner. Upgrade step:makemigrations(ormakeguitarmigrations) emits one migration in each app hosting an owner that retires every per-key revive whose key still cascades,IF EXISTSover every spelling its tables held, and creates the per-owner triggers;--checkfails until it is generated. Its reverse rebuilds the per-key triggers. - A child table dropped without its retirement (#63) now breaks only an
UPDATEthat revives a row of the owner, where it broke everyUPDATE. Quieter, so keepmakemigrations --checkin CI: deleting the child's model moves the owner trigger's digest, and--checkin a run including the trigger's host app fails until the trigger is regenerated without that arm. A run scoped away from that app names the trigger. - An MTI parent and its child both keyed from one model no longer clash on a revive name: their revives are two arms of one function. The cascade rule clash on that shape is unchanged.
Added
scripts/bench_revive.py, timing a single-rowUPDATEwith N keys' revives per key and per owner. Not run in CI.