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

Clear Versioning History (just once)


Reply


3 Posts   1495 Views

Avatar
DeklinKelly

Community Member, 197 Posts

10 June 2009 at 10:33pm

I created a site for my client, and to test it I created many rubbish pages. I also added rubbish content to real pages before adding new pages. I deleted the rubbish pages and content however the data is still available in the administrative area through versioning history.

How can I clear all versioning history so only versions from now on will be preserved?

Avatar
ChrisBryer

Community Member, 95 Posts

18 June 2009 at 7:26am

the only way i know of to dump the versioning history is to empty the database table SiteTree_versions. if you have extended sitetree and added database fields, there will be extra tables like products, products_Live, and products_versions that will contain the extended data, and you could probably dump the data in those extended _versions tables as well.

NOTE::: this will permanently delete all versions and you wont be able to get it back!

I'd test locally before messing with a live site too, so you know what to expect.

oh, and back up the database before you try it too, so you can recover the data if you need.

good luck,
-Chris

Avatar
BuddhaSource

Community Member, 57 Posts

27 June 2009 at 10:09pm

Thanks,

Was searching arround for the solution, although I knew that I can truncate data from Database directly but was hoping if this was already included in SilverStripe admin panel.

You can truncate all the modules table postfix with "_version"