[rt-users] RT2 database cleanup before rt2->rt3 migration

Vivek Khera vivek at khera.org
Fri Sep 24 10:30:11 EDT 2004


On Sep 24, 2004, at 10:19 AM, Ruslan U. Zakirov wrote:

> not only one DB record but many records. also user can be owner or cc 
> for some live ticket, but have no tickets requested at all, so you 
> should check all relations to be sure that your DB is consistent.
>

Before I did my migration, I ensured all data was "clean" by having 
proper foreign keys defined for all the relations.  I was then able to 
delete tickets marked "dead".  Then, since only my 'privileged' users 
are allowed to own tickets or be admincc/cc on them, I did a left join 
on ticket owners and users list and purged any users with NULL ticket 
references unless they were privileged (eg, root doesn't own any 
tickets).

Then the migration from rt2 to rt3 went along quite smoothly.

Once again, I call for Jesse to put in the proper FK's in the official 
schema :-)


Vivek Khera, Ph.D.
+1-301-869-4449 x806

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2476 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20040924/e629158f/attachment.bin>


More information about the rt-users mailing list