]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 462070: Add FK constraints to the status_workflow table - Patch by Nitish Bezzala...
authorlpsolit%gmail.com <>
Sat, 30 May 2009 11:49:49 +0000 (11:49 +0000)
committerlpsolit%gmail.com <>
Sat, 30 May 2009 11:49:49 +0000 (11:49 +0000)
Bugzilla/DB/Schema.pm

index 5416a9fe8760ad8e34b65d8abd990e5d5b7be928..ad2303efc14bea0d1322e6a924e8e266ed33b5a8 100644 (file)
@@ -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 => [