It would useful to have a CLI command/Utility to flush revisions when maxRevisions is adjusted mid-project.
As an example, if you decide to set 'maxRevisions' => 10 on a project which didn't have a limit before, all revisions beyond the limit will only get flushed when the entry itself is resaved in the Control Panel.
Wouldnt resave/ clear the revisions? Admittedly it's not purpose-built and so a little slower but it should work fine?
Hey @gtettelaar, no it doesn't. Revisions get flushed when a revision is created.
@olivierbon Doh! Didn't look at the code but just assumed this would happen during saving in ->getElements()->saveElement().
+1 on this tho, deleting entry revisions should be possible or have a dedicated command line exec.
Just added a utils/prune-revisions command for Craft 3.4.
Most helpful comment
Just added a
utils/prune-revisionscommand for Craft 3.4.