From e73a7b4c8b4d5980bb825543c256cfc20202be15 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Sat, 30 May 2009 11:49:49 +0000 Subject: Bug 462070: Add FK constraints to the status_workflow table - Patch by Nitish Bezzala r/a=mkanat --- Bugzilla/DB/Schema.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 5416a9fe8..ad2303efc 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 => [ -- cgit v1.2.3-24-g4f1b