diff options
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r-- | Bugzilla/Install/DB.pm | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 66461bf45..28f91a23c 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -598,6 +598,7 @@ sub update_table_definitions { _add_allows_unconfirmed_to_product_table(); _convert_flagtypes_fks_to_set_null(); _fix_decimal_types(); + _fix_series_creator_fk(); # 2009-11-14 dkl@redhat.com - Bug 310450 $dbh->bz_add_column('bugs_activity', 'comment_id', {TYPE => 'INT3'}); @@ -3374,6 +3375,16 @@ sub _fix_decimal_types { $dbh->bz_alter_column('longdescs', 'work_time', $type); } +sub _fix_series_creator_fk { + my $dbh = Bugzilla->dbh; + my $fk = $dbh->bz_fk_info('series', 'creator'); + # Change the FK from SET NULL to CASCADE. (It will be re-created + # automatically at the end of all DB changes.) + if ($fk and $fk->{DELETE} eq 'SET NULL') { + $dbh->bz_drop_fk('series', 'creator'); + } +} + 1; __END__ |