Bug 406351 - 3.25: Foreign key support in DB schema.
Summary: 3.25: Foreign key support in DB schema.
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: Bugzilla General
Version: 3.2
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Tony Fu
QA Contact:
URL:
Whiteboard:
Depends On: 420611
Blocks: RHBZ30UpgradeTracker 427052
TreeView+ depends on / blocked
 
Reported: 2007-11-30 16:58 UTC by David Lawrence
Modified: 2013-06-24 04:18 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-02-15 07:24:37 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 109473 0 None None None Never

Description David Lawrence 2007-11-30 16:58:46 UTC
Description:
Red Hat has added referential integrity checks to the database schema to ensure against any foreign key violations. Upstream Bugzilla code has implemented some initial support for foreign keys as well.

Function Requirements:
MySQL 5+ redhat/bugs-fk.mysql

Comment 1 Tony Fu 2007-12-18 06:17:59 UTC
It is implemented in bugs-fk.mysql file.  I used historical method and the LOC
is 640.

Comment 2 Kevin Baker 2007-12-18 13:36:33 UTC
Tony, how do you get 640 lines? I would expect that you only have to add
the FK constraints. That would be around 100LOC, no?

Comment 3 Tony Fu 2007-12-19 01:26:23 UTC
I used cloc to calculate the LOC of our existing db schema file, which includes
FK constraints and all talbes definition as well.  For FK constraints only,
100LOC is a reasonable number.

Changing LOC to 100.

Comment 4 Tony Fu 2008-01-10 06:17:01 UTC
Added FKs constraints in Bugzilla/DB/Schema.pm file.  Please refer to bug #420611.

Comment 5 Tony Fu 2008-01-25 01:16:25 UTC
Submitted a Bugzilla/DB/Schema.pm patch, which included all foreign key
constraints, to upstream for review.

Comment 6 David Lawrence 2008-01-25 03:02:07 UTC
Tony please attach the upstream bug link to this bug so we can keep track of it.
Either in the External Bugzilla References section or in the URL text field.

Thanks

Comment 7 Tony Fu 2008-02-11 07:21:11 UTC
Get review feedback from upstream.

Update the schema according to the feedback and submitted new patch for upstream
review.

Comment 8 David Lawrence 2008-02-14 05:32:50 UTC
Do we already have this in our 3.2 tree? If not we will need a patch for this
bug so hit our first milestone.

Dave

Comment 9 Tony Fu 2008-02-14 06:57:48 UTC
(In reply to comment #8)
> Do we already have this in our 3.2 tree? If not we will need a patch for this
> bug so hit our first milestone.
> 
> Dave

It should have been included in Bugzilla/DB/Schema.pm I attached in #420611.


Tony

Comment 10 Tony Fu 2008-02-15 07:24:37 UTC
Will create a new bug to track the progress of mergering FKs constraints into
upstream code.

Close this bug.


Note You need to log in before you can comment on or make changes to this bug.