[rt-users] Dropping all tickets from a database

Jay Kramer jay at mojomole.com
Fri Sep 14 18:37:20 EDT 2001


Just do a mass update on all the tickets at once...  then use the script
here to delete the dead tickets...  ps, I am sure it should not be hard to
change the script above to delete ALL tickets..  just one single change
would do it...  to delete all tickets without a mass update, change the line
in the script that says
---------------------
# prepare the query for dead tickets
my $sth = $dbh->prepare( "
              SELECT id FROM Tickets where Status='dead';");
--------------------
to:
# prepare the query for dead tickets
my $sth = $dbh->prepare( "
              SELECT id FROM Tickets;");
---------------------


Delete Dead Tickets available from:
http://dev.inet-technologies.com/rt2/
ps, thank Steve Poirier for creating this script!

Jay

> I'd like to drop all the tickets from my database, while I'm working on
> importing (running into some parsing bugs, and every time i reimport, I
end
> up with double copies of transactions).  I'd like to drop all my tickets
> and transcations without losing my scrips and other bits of configuration.
> Is there an easy way to do this?
>
> _______________________________________________
> rt-users mailing list
> rt-users at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-users
>





More information about the rt-users mailing list