From dbd3c06a8d16dba4871476405f55f972c59d6f19 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Tue, 31 Mar 2009 19:42:02 +0000 Subject: Bug 462068: Add FK constraints to the longdescs table - Patch by Vipin Hegde r/a=mkanat --- Bugzilla/DB/Schema.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 1afdb6598..7f094983f 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -375,8 +375,14 @@ use constant ABSTRACT_SCHEMA => { FIELDS => [ comment_id => {TYPE => 'MEDIUMSERIAL', NOTNULL => 1, PRIMARYKEY => 1}, - bug_id => {TYPE => 'INT3', NOTNULL => 1}, - who => {TYPE => 'INT3', NOTNULL => 1}, + bug_id => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'bugs', + COLUMN => 'bug_id', + DELETE => 'CASCADE'}}, + who => {TYPE => 'INT3', NOTNULL => 1, + REFERENCES => {TABLE => 'profiles', + COLUMN => 'userid', + DELETE => 'RESTRICT'}}, bug_when => {TYPE => 'DATETIME', NOTNULL => 1}, work_time => {TYPE => 'decimal(5,2)', NOTNULL => 1, DEFAULT => '0'}, -- cgit v1.2.1