eZ Community » Forums » General » Bulk delete all archived versions of...
expandshrink

Bulk delete all archived versions of content objects

Bulk delete all archived versions of content objects

Sunday 01 February 2015 2:05:40 pm - 3 replies

Hi,

is there a way to bulk delete all archived versions of all content objects from the database (and file storage, in case of images/files)? I don't want to generally disable versioning, I just would like a onetime  script that removes all old versions before copying a site to the live enviroment.

Thanks in advance,
Reinhard 

Modified on Sunday 01 February 2015 2:06:22 pm by Reinhard Hutter

Sunday 01 February 2015 4:59:24 pm

flatten.php sounds like the answer:

https://doc.ez.no/eZ-Publish/Upgrading/The-system-upgrade-scripts#eztoc33045_5

Monday 16 February 2015 6:12:28 pm

Hi there! How about removing the archived version of the content objects of only a specific class (e.g article)?

Tried by passing a class identifier...

 bin/php/flatten.php -s eng article

..but, of course, it didn't work ;P

As possible value: contentobject, contentclass, workflow, role or all, but I need for only one class.

Is that possible?

Tuesday 17 February 2015 3:51:14 am

Hello Lo F,

You could re-implement the flatten php cli script but otherwise ... no.

I re-implemented the image alias generation / removal functionality to be much more flexible (just like your asking for actually) with bcimagealias extension so I know what you want can probably be done but you will have to do the work. 

Here is a key to your getting started:

https://github.com/ezsystems/ezpu...blob/master/bin/php/flatten.php#L138

https://github.com/ezsystems/ezpu...ses/ezcontentobjectversion.php#L1003

I hope this helps!

Cheers,
Heath

Modified on Tuesday 17 February 2015 3:54:15 am by // Heath

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from