Closed Bug 545770 Opened 14 years ago Closed 14 years ago

contrib/merge-users.pl should figure out columns to fix by tracing FKs

Categories

(Bugzilla :: Bugzilla-General, enhancement)

3.5.3
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

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.
Severity: normal → enhancement
Target Milestone: --- → Bugzilla 3.8
Attached patch v1Splinter Review
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).
Assignee: general → mkanat
Status: NEW → ASSIGNED
Attachment #427041 - Flags: review?(LpSolit)
Comment on attachment 427041 [details] [diff] [review]
v1

Works fine. r=LpSolit
Attachment #427041 - Flags: review?(LpSolit) → review+
Flags: approval+
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/                       
modified Bugzilla/DB.pm
modified contrib/merge-users.pl
Committed revision 7069.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: