Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

cleaning 'history' out of the database


Reply

2 Posts   366 Views

Avatar
Futureweb

13 February 2012 at 4:40pm Community Member, 233 Posts

Hello,

I'm working on clients site, the 'SiteTree_versions' table has 55,000 entries and is 86mb. The site has maybe 100 pages, but some are long and updated regularly.

I don't think the client even know about the history options, and probably don't need to keep copies going back years.

It would be nice if there was a way to clear all but say the last 5 version....

any ideas?

Avatar
swaiba

13 February 2012 at 9:37pm Forum Moderator, 1796 Posts

https://github.com/silverstripe-labs/silverstripe-recipes/blob/master/model/tools/SanitiseTasks.php

the above might get you started...