[rt-users] Pruning Users
Guillaume Perréal
perreal at lyon.cemagref.fr
Tue Sep 16 05:16:24 EDT 2003
Vivek Khera a écrit :
>>>>>>"RW" == Robert Westendorp <rjwsys at uniserve.com> writes:
>>>>>>
>>>>>>
>RW> Does anyone have a script that will go through and remove users that don't
>RW> have any affiliation with any tickets (ie removed dead tickets)? We
>RW> currently have about 50000 users (Mostly non-priviledged users) and was
>RW> wondering if anyone had a quick way of cleaning those up.
>
>Sounds like a job for a LEFT JOIN in sql. Are there any tables that
>reference user IDs other than the tickets table? If so, then you'll
>have to chase after those tables and delete as well.
>
Many tables have "CreatorId" and "LastUpdatedBy" fields. You can take a
look in the constraints.mysql file (in RT etc/ directory), searching for
"REFERENCES Users(id)" and I think it worths take look at Principals too.
--
Guillaume Perréal.
Responsable informatique,
Cemagref, groupement de Lyon,
France.
Tél: (+33) 4.72.20.87.87.
Fax: (+33) 4.78.47.78.75.
Site: http://www.lyon.cemagref.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20030916/86aa1341/attachment.htm>
More information about the rt-users
mailing list