Closed Bug 427477 Opened 16 years ago Closed 16 years ago

Add foreign key constraints for series table and series_data table

Categories

(Bugzilla :: Database, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.4

People

(Reporter: tfu, Assigned: tfu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070510 Fedora/1.5.0.10-6.fc6 Firefox/1.5.0.10
Build Identifier: 

Add foreign key information for series table and seris_data table in Bugzilla/DB/Schema.pm file.

Reproducible: Always
Assignee: database → tfu
Severity: normal → enhancement
Target Milestone: --- → Bugzilla 4.0
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 314024 [details] [diff] [review]
Add foreign key constraints for series table and series_data table

Is NULL actually OK in the creator field? I know nothing about these tables. Do these foreign keys look right to you, Gerv?
Attachment #314024 - Flags: review?(mkanat) → review?(gerv)
Comment on attachment 314024 [details] [diff] [review]
Add foreign key constraints for series table and series_data table

I'm not completely up on the syntax, but these relationships seem right to me.

Gerv
Attachment #314024 - Flags: review?(gerv) → review+
That's good enough for me. As long as creator can be NULL, those all look find to me too.
Flags: approval+
Checking in Bugzilla/DB/Schema.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v  <--  Schema.pm
new revision: 1.102; previous revision: 1.101
done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 4.0 → Bugzilla 3.4
Comment on attachment 314024 [details] [diff] [review]
Add foreign key constraints for series table and series_data table

>+            creator     => {TYPE => 'INT3',
>+                            REFERENCES => {TABLE  => 'profiles',
>+                                           COLUMN => 'userid',
>+                                           DELETE => 'SET NULL'}},

gerv, when deleting a user account, editusers.cgi explicitly deletes all series created by this user. So for consistency, it should be DELETE => 'CASCADE' here, not 'SET NULL'. I will file a separate bug for this.
Blocks: 519035
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: