Instead of having a static list of columns, contrib/merge-users.pl should use the database's foreign keys (just figuring out which columns point to profiles.userid). We would just have to separate a "get_related_fks" out of "drop_related_fks" in Bugzilla::DB for this. If anybody's wondering, the inspiration for this is that I had to remove "votes" from contrib/merge-users.pl, and I think it'd be silly to add a hook to merge-users.pl just for this, when it can all automatically be figured out from the database.
Created attachment 427041 [details] [diff] [review] v1 Okay, so here it is. The DB part I grant r+ to as module owner, but the merge-users part should probably be checked over (although I did test it briefly).
Comment on attachment 427041 [details] [diff] [review] v1 Works fine. r=LpSolit
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/ modified Bugzilla/DB.pm modified contrib/merge-users.pl Committed revision 7069.