script cleanup

Ben Chavet <[email protected]>
Newsgroups gmane.comp.horde.ansel
Message-ID <[email protected]>
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
-- 
ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.