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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Deleting old versions


Go to End


3 Posts   2381 Views

Avatar
Chris Hope

Community Member, 18 Posts

13 March 2010 at 6:11pm

Edited: 13/03/2010 6:15pm

Is there an in-built way (or an add-on module) to delete old versions of content from the various _versions tables? Ideally what I'd like is to keep at least the most recent version in those tables, and potentially only purge up to a particular date. If there isn't a module for this (I don't recall seeing one) or a built-in way to do it, then I may write a module to do this myself.

Avatar
Sean

Forum Moderator, 922 Posts

13 March 2010 at 8:06pm

Edited: 13/03/2010 8:09pm

There isn't any automated mechanism or even an interface for deleting versions.

At the moment, you'll have to delete the SiteTree_versions (and any derived classes tables) as you see fit. Although I suppose it would be nice if pages only had up to x (configurable) versions, so the last version after x just drops off when someone saves a page.

If you do make something, please submit it to http://silverstripe.org/extensions :)

Sean

Avatar
Berteh

Community Member, 11 Posts

8 September 2010 at 11:05pm

Solution proposed in http://www.silverstripe.org/general-questions/show/251293#post251293, as emptying the table SiteTree_version will prevent you from being able to restore to the current version.

Nevertheless I think this is an important missing feature of silverstripe that prevents its use in websites that often make small changes to webpages.

My database is ~80Mb before cleaning, and ~8Mb after cleaning the history... after only 3 months of editing, that's not tolerable. Please provide for a "limit" to the amount of revisions stored!

Otherwise great CMS, thanks!
Berteh.