Cleaning up attachment database

If you are having a problem using Dragnet, post a message here.

Moderator: SourceGear

Locked
Blake

Cleaning up attachment database

Post by Blake » Wed Jan 26, 2005 10:29 am

What does SourceGear propose for forward maintenance of the attachment database? I can see in our setting the size growing out of control; it's already over 1GB.

How about a feature that purges attachments older than nn days?

Thanks,
Blake.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Jan 26, 2005 1:04 pm

Currently there is no way to do this. I've added a feature request for this type of functionality.

HOWEVER - If you want to spend some time on some SQL queries, you might be able to come up with something that deleted attachments from posts ( messages ) where the message's posted date was less than a certain value.
Jeff Clausius
SourceGear

Blake

Unfortunately...

Post by Blake » Thu Jan 27, 2005 12:30 pm

I just realized that not only is there not an automated functionality to delete attachments, but there is currently NO way to delete even attachments individually for end-users. This seems to be a sorely lacking feature.

Can you add that, too? What will happen if I just remove attachments; will it break gracefully when I try to view an item?

Thanks,
Blake.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Thu Jan 27, 2005 2:15 pm

It should be safe to delete any row from the attachments table. It shouldn't have any affect on the item, except for the removal of an attachment.

One alternative for external submission attachments, one could gain more more control using the external submission API to set a size limit or completely disallow attachments on external submissions.

As for deleting attachments from external submission, can you give some more detail on what you would like to see? I was thinking something like a "Query Page", where you could delete attachments for items meeting a user-defined criteria. Any thoughts here?
Jeff Clausius
SourceGear

Blake
Posts: 2
Joined: Wed Nov 30, 2005 2:21 pm

Post by Blake » Wed Nov 30, 2005 2:22 pm

Have there been any updates on this functionality since my original inquiry in January?

The size of our database is very large now due to all of the attachments and I would like to remove everything older than a few months for archive purposes.

Thanks,
Blake.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 30, 2005 2:56 pm

Sorry, no. We've been waiting for feedback from customers before deciding on how to implement the feature. Do you have any thoughts on my previous post?

The only work around is to manually remove the attachments from the database.
Jeff Clausius
SourceGear

Blake
Posts: 2
Joined: Wed Nov 30, 2005 2:21 pm

Attachment cleanup thoughts

Post by Blake » Wed Nov 30, 2005 3:06 pm

jclausius wrote:Sorry, no. We've been waiting for feedback from customers before deciding on how to implement the feature. Do you have any thoughts on my previous post?
1. A maintenance/cleanup option for the admin, eg. remove all files older than nn days,

2. Some sort of flag (a checkbox?) when the user is adding an attachment that allows for 'permanent archive', that is, the ability to retain specially marked attachments when purging the database for general maintenance.

Can I remove the columns in the database without causing any broken relationships or errors thrown at the application-level by the DragNet interface?

Thanks for the quick response.

Regards,
Blake.

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Nov 30, 2005 3:12 pm

This enhancement is currently logged for Dragnet 1.1, so I'll update the bug. Some good suggestions. Thanks.

As for attachments, just removing the rows from the attachments table is the only thing required. No other table "housekeeping" is required.
Jeff Clausius
SourceGear

Locked