NAME
RTx::Shredder - Cleanup RT database
SYNOPSIS
use RTx::Shredder;
RTx::Shredder::Init();
my $deleted = RT::Tickets->new( $RT::SystemUser );
$deleted->{'allow_deleted_search'} = 1;
$deleted->Limit( VALUE => 'deleted' );
while( my $t = $deleted->Next ) {
$t->Wipeout;
}
DESCRIPTION
RTx::Shredder is extention to RT API which allow to delete data from database.
USAGE
RTx::Shredder is extension to RT API which add(push) methods into base RT classes.
Dependencies
Dependencies method implementend in each RT class which Shredder can delete. Now Shredder support wipe out of Ticket, Transaction, Attachment, TicketCustomFieldValue, Principal, ACE, Group, GroupMember, CachedGroupMember.
NOTES
Transactions support
Transactions unsupported yet, so it's only save when all other interactions with RT DB are stopped.
Foreign keys
This two keys don't allow delete Tickets because of bug in MySQL ALTER TABLE Tickets ADD FOREIGN KEY (EffectiveId) REFERENCES Tickets(id); ALTER TABLE CachedGroupMembers ADD FOREIGN KEY (Via) REFERENCES CachedGroupMembers(id);
http://bugs.mysql.com/bug.php?id=4042
BUGS
rtx-shredder.in
Module also install crappy rtx-shredder.in file, this shouldn't happen in future.
Documentation
Many bugs in small docs: insanity, spelling, gramar and so on. Patches are wellcome.
AUTHOR
Ruslan U. Zakirov <cubic@wildgate.miee.ru>
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the Perl distribution.
SEE ALSO
perl(1), rtx-shredder