Comment 8 for bug 885270

Revision history for this message
Jason Boyer (jboyer) wrote :

We recently untangled these in Indiana using a couple different methods. I've cleaned them up and put together a script that can be run through psql. As it is the whole thing is run through in a single transaction (perhaps after hours if you have a lot of them). If you have too many shared addresses to do in one shot a limit parameter could be added to the fix_addresses function and the applicable loops, and the drop function at the bottom removed.

This will tell you how many user accounts will be affected:
SELECT count(au.id) FROM actor.usr au LEFT JOIN actor.usr_address auam ON (au.mailing_address = auam.id) LEFT JOIN actor.usr_address auab ON (au.billing_address = auab.id) WHERE (au.id != auam.usr) OR (au.id != auab.usr);

After (well, before is certainly fine) running this, set the "Patron Registration: Cloned patrons get address copy" OU Setting to True at the top level of your OU tree, and feel relief wash over you as an entire class of end-user tickets is eliminated.