From: lpsolit%gmail.com <> Date: Sat, 30 May 2009 11:49:49 +0000 (+0000) Subject: Bug 462070: Add FK constraints to the status_workflow table - Patch by Nitish Bezzala... X-Git-Tag: bugzilla-3.5.1~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e73a7b4c8b4d5980bb825543c256cfc20202be15;p=thirdparty%2Fbugzilla.git Bug 462070: Add FK constraints to the status_workflow table - Patch by Nitish Bezzala r/a=mkanat --- diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 5416a9fe87..ad2303efc1 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -805,8 +805,14 @@ use constant ABSTRACT_SCHEMA => { status_workflow => { FIELDS => [ # On bug creation, there is no old value. - old_status => {TYPE => 'INT2'}, - new_status => {TYPE => 'INT2', NOTNULL => 1}, + old_status => {TYPE => 'INT2', + REFERENCES => {TABLE => 'bug_status', + COLUMN => 'id', + DELETE => 'CASCADE'}}, + new_status => {TYPE => 'INT2', NOTNULL => 1, + REFERENCES => {TABLE => 'bug_status', + COLUMN => 'id', + DELETE => 'CASCADE'}}, require_comment => {TYPE => 'INT1', NOTNULL => 1, DEFAULT => 0}, ], INDEXES => [