[ansel] script cleanup

Ben Chavet ben at chavet.net
Mon May 24 23:56:06 PDT 2004


A while ago, I committed a touch_galleries.php script to ansel.  Turns out, it
"touched" the images, too & gave them all of the gallery attributes.  This adds
a lot of unnecessary bloat to the database.  This SQL command:

delete from horde_datatree_attributes where datatree_id in (select datatree_id
from horde_datatree_attributes where attribute_name='type' and
attribute_value='image/jpeg') and (attribute_name='thumbnail_width' or
attribute_name='thumbnail_height' or attribute_name='image_width' or
attribute_name='image_height' or attribute_name='default' or
attribute_name='default-type' or attribute_name='num-images' or
attribute_name='date-created' or attribute_name='last-modified');

worked for me to clean up my horde_datatree_attributes table.  Use it at your
own risk...

--Ben


More information about the ansel mailing list