Skip to content

v4.6.4 - Fix revision pruning

Latest

Choose a tag to compare

@tallcms tallcms released this 10 Jun 12:56
· 1 commit to main since this release

Bug Fixes

  • Revision pruning now deletes the oldest revisions instead of the newest. The revisions() relation orders newest-first (orderByDesc), and the pruning logic's appended orderBy('revision_number') only added a secondary sort clause — leaving the descending order in effect. As a result, automatic and manual revision limits pruned the most recent revisions and kept the oldest. Fixed by using reorder('revision_number', 'asc') before the limited delete in both pruning paths. (#102)
  • Added regression tests covering automatic, manual, and mixed revision pruning limits.

Thanks to @VaclavKlima for the fix.