Add FK constraints to the status_workflow table

RESOLVED FIXED in Bugzilla 3.6

Status

()

Bugzilla
Database
--
enhancement
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Frédéric Buclin, Assigned: Nitish Bezzala)

Tracking

(Blocks: 1 bug)

Bugzilla 3.6
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
The old_status and new_status columns of the status_workflow table should point to bug_status.id. Not that old_status can be NULL. I hope this doesn't prevent to add the constraint to it.
(Reporter)

Updated

9 years ago
Whiteboard: [Good Intro Bug]

Comment 1

9 years ago
I can work on this. For MySQL and Oracle, the foreign keys in the referencing table can have nulls in them, so keeping old_status NULL in any row should not be a problem.

Updated

9 years ago
Assignee: database → vipinhegde
(Assignee)

Comment 2

9 years ago
Created attachment 379655 [details] [diff] [review]
Added the foreign key constraint
Attachment #379655 - Flags: review?(LpSolit)
(Reporter)

Updated

9 years ago
Attachment #379655 - Flags: review?(LpSolit) → review?(mkanat)

Updated

9 years ago
Attachment #379655 - Flags: review?(mkanat) → review+

Updated

9 years ago
Assignee: vipinhegde → nbezzala
Flags: approval+
Whiteboard: [Good Intro Bug]
Target Milestone: --- → Bugzilla 3.6
(Reporter)

Comment 3

9 years ago
Checking in Bugzilla/DB/Schema.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Schema.pm,v  <--  Schema.pm
new revision: 1.119; previous revision: 1.118
done
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.