Created by: Matt Jones ([email protected]) on 2015/11/11 13:01:18 +0000
Votes at time of UserVoice import: 10
When entry revisions are turn on for a section there is currently no method to cap/limit the number of revisions saved in the database so the entry versions table continues to grow indefinitely and therefore the database size also.
If there could be either a field in the section settings page to enter a number, or a general config setting to do the same that would be really useful.
Not sure if this is something on the docket for Craft 3.x but it would _really_ help a handful of sites we have. One of our sites has ~900 MB in the entryversions table and it'd be nice to have some kind of garbage collection/limiting to shrink this down.
I know about @carlcs's awesome plugin to clear this out, but it'd be nice to selectively purge this area and handle it in a first-party way.
You all are _awesome_! Can't wait for 3.2! 馃挭
Only took us 3.5 years :)

I am not super comfortable with reading the yii classes.
How would I set this new setting?
Like this?
_config/general.php_
return [
'*' => [
'maxRevisions' => 5
]
]
Because I had a post where I already had 12 drafts and I expected them to be cut down to 5.
Didn't happen though.
Or will it only happen for new drafts?
@Jones-S Craft only enforces the setting when a new revision is created.