FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

How to delete all posts (without installing all over again)

Hi,

The current FogBugz setup is fine, so instead of installing all over, we want to flush all tickets/cases from the database.

How is this done? Is it sufficient to delete * from these tables: bug, bugevent, and bugview?

Thanks,
Lars
Lars
Tuesday, February 17, 2009
 
 
Also:

Attachment (where ixBug > 0)
BugRelation
CVS (if you use source code control integration)
Duplicates
TimeInterval
Prediction
Scout
Subscriptions (where ixBug > 0)


And reset your search index.
Rich Armstrong Send private email
Tuesday, February 17, 2009
 
 
Rich, thanks a lot.

One question; there is no ixBug in attachment table. What do I do about that in relation to (where ixBug > 0)?
Lars
Tuesday, February 17, 2009
 
 
It's the ixBugEvent column in the Attachment table.  Example:

DELETE FROM Attachment WHERE ixBugEvent IN (SELECT ixBugEvent FROM BugEvent WHERE ixBug IN (SELECT ixBug FROM Bug WHERE ixProject = 324))
Rich Armstrong Send private email
Wednesday, February 18, 2009
 
 
Rich, this might save a few cycles by not using two IN clauses...

DELETE FROM Attachment
WHERE ixBugEvent IN (
  SELECT be.ixBugEvent
  FROM BugEvent AS be, Bug AS b
  WHERE be.ixBug = b.ixBug
  AND b.ixProject = 324
)

Unfortunately, I don't think you can do a correlated sub-query with a delete statement.
Ian M. Jones (CaseDetective) Send private email
Wednesday, February 18, 2009
 
 
Thanks!
Rich Armstrong Send private email
Thursday, February 19, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.