Closed Bug 625190 Opened 14 years ago Closed 14 years ago

Typo and Missing FK in Bugzilla::DB::Schema

Categories

(Bugzilla :: Database, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 4.0

People

(Reporter: dmarshall, Assigned: dmarshall)

References

Details

Attachments

(1 file)

I'm reconciling Bugzilla::DB::Schema with our actual database and found two discrepancies.  bugs.qa_contact has a typo, REERENCES vice REFERENCES.  bug_see_also should also have a foreign key on bugs.
Attachment #503300 - Attachment mime type: application/octet-stream → text/plain
Attachment #503300 - Attachment is patch: true
Comment on attachment 503300 [details] [diff] [review]
patch to correct discrepancies

Unrelated to this bug: I think qa_contact should have ON DELETE CASCADE.
Attachment #503300 - Flags: review?(mkanat)
Assignee: database → dmarshal
Status: NEW → ASSIGNED
(In reply to comment #1)
> Unrelated to this bug: I think qa_contact should have ON DELETE CASCADE.

Err... I obviously meant: ON DELETE SET NULL! Thanks dwm for catching that. :)
Comment on attachment 503300 [details] [diff] [review]
patch to correct discrepancies

Oh wow, yes, thank you for catching that!

It would also be nice to add some code to delete the "REERENCES" from bz_schema....
Attachment #503300 - Flags: review?(mkanat) → review+
Flags: approval4.0+
Flags: approval+
Target Milestone: --- → Bugzilla 4.0
This typo has been introduced in Bugzilla 3.6 by bug 462067. Shouldn't we take the typo fix for this branch? The other change in the patch is an enhancement and doesn't need to land there.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified Bugzilla/DB/Schema.pm
Committed revision 7655.

Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/4.0/
modified Bugzilla/DB/Schema.pm
Committed revision 7514.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Depends on: 462067
Flags: approval3.6?
Resolution: --- → FIXED
(In reply to comment #4)
> This typo has been introduced in Bugzilla 3.6 by bug 462067. Shouldn't we take
> the typo fix for this branch? The other change in the patch is an enhancement
> and doesn't need to land there.

  Well, unfortunately fixing the typo will also cause a database change on a stable branch--a database change on the bugs table, at that (which can be very slow). Since I don't think that the FK is really all that important, I'd rather not force a DB change on people who are running 3.6.x.
Flags: approval3.6?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: