Table CMS_ObjectVersionHistory

Anson Tyau asked on June 30, 2014 18:09

My [CMS_ObjectVersionHistory] is over 500mb, and I was wondering if there were any negative consequences to deleting data from this table? Any other considerations?

Also, is there a site manager function that restricts the versions to only the last 2-3 instead of everything?

Recent Answers

Brenden Kehren answered on June 30, 2014 23:35

Don't delete it manually, modify your settings in the site manager and reduce the number of versions you have. 500mb is a small price to pay for multiple versions of the same document.

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on July 1, 2014 09:00

Hello Anson,

You can change the settings via Site Manager, please take a look at the Dev Guide section: Configuring object versioning

where you can find especially the following options:

  • Version history length (major versions)
  • Version history length (minor versions)

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

Joe Krill answered on February 4, 2015 16:23

This question hasn't actually been answered.

First, the response given doesn't actually do anything to the data that already exists. I've tried modifying the settings, and no rows were actually removed by doing that.

Second, no one actually answered the question of whether there are any negative consequences to this (other than the obvious fact that you'll lose your version history). It's fine to say "you really shouldn't do that, try this instead because x, y, z", but that still leaves the question itself open of there are any negative side effects of simply removing the data.

0 votesVote for this answer Mark as a Correct answer

Martin Danko answered on February 5, 2015 16:39

Hello Joe,

No there are no side effects.. it's just about version history. The last version will be still used as the current version. It can have only negative effects e.g. for your editors.. who won't be able to restore older versions anymore :)

And yes, this doesn't affect already existing data. That's the reason why you should check all your settings before the website is published. You can delete existing records by deleting already existing version via UI or via API

Actually I found a user requirement for a button which would automatically delete version history according to settings - Clean version history option. If you find a button like this useful, you can add your vote for this feature. In case it gets enough votes and more users consider this idea helpful, our developers will implement it in the next version of Kentico.

Until then, you would need to use Kentico API to delete version history. It is a more safe way than deleting rows directly from the database so you do not have to worry about making any inconsistencies on DB or site level. Please see Developer's Guide - Object versioning API Examples for more details (especially DestroyVersion() and DestroyHistory() methods).

Best regards, Martin

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.