[rt-users] RTx::Shredder to delete old tickets

Vivek Khera vivek at khera.org
Wed Jul 14 15:27:52 EDT 2004


On Jul 14, 2004, at 2:57 PM, Les Mikesell wrote:

> tickets, could it also delete the unprivileged users that no
> longer had tickets in the system?   I'm planning to start over
>

I did this shortly before my rt2->rt3 migration:

begin;

delete from users where id in (select users.id from users left join 
attachments on (users.id=attachments.creator) where attachments.id is 
null and users.privileged = 0);

delete from users where id in (select users.id from users left join 
tickets on (users.id=tickets.creator) where tickets.id is null and 
users.privileged = 0);

commit;




More information about the rt-users mailing list