summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-12-31 14:01:47 +0100
committermkanat%bugzilla.org <>2009-12-31 14:01:47 +0100
commit0c266590b454f88f55fb4b39a5bce5532ca5baa0 (patch)
treef8af064d0b6ada1a82843fb9e09c0beee6d885b8 /Bugzilla/Install/DB.pm
parent8d2b07ea05e895f040d1805221135bfb68dc7f7c (diff)
downloadbugzilla-0c266590b454f88f55fb4b39a5bce5532ca5baa0.tar.gz
bugzilla-0c266590b454f88f55fb4b39a5bce5532ca5baa0.tar.xz
Bug 531841: Change all hour-related database fields to decimal(7,3) so that they can store numbers greater than 999.99 in modern versions of MySQL.
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 7a9fa72d8..f6d6edcb1 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -593,8 +593,8 @@ sub update_table_definitions {
$dbh->bz_drop_column('products', 'milestoneurl');
_add_allows_unconfirmed_to_product_table();
-
_convert_flagtypes_fks_to_set_null();
+ _fix_decimal_types();
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
@@ -3354,6 +3354,14 @@ sub _convert_flagtypes_fks_to_set_null {
}
}
+sub _fix_decimal_types {
+ my $dbh = Bugzilla->dbh;
+ my $type = {TYPE => 'decimal(7,2)', NOTNULL => 1, DEFAULT => '0'};
+ $dbh->bz_alter_column('bugs', 'estimated_time', $type);
+ $dbh->bz_alter_column('bugs', 'remaining_time', $type);
+ $dbh->bz_alter_column('longdescs', 'work_time', $type);
+}
+
1;
__END__