summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Bugzilla/DB/Schema.pm6
-rw-r--r--Bugzilla/Install/DB.pm10
2 files changed, 12 insertions, 4 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index dbea63f79..8bee5dfe1 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -285,9 +285,9 @@ use constant ABSTRACT_SCHEMA => {
NOTNULL => 1, DEFAULT => 'TRUE'},
cclist_accessible => {TYPE => 'BOOLEAN',
NOTNULL => 1, DEFAULT => 'TRUE'},
- estimated_time => {TYPE => 'decimal(5,2)',
+ estimated_time => {TYPE => 'decimal(7,2)',
NOTNULL => 1, DEFAULT => '0'},
- remaining_time => {TYPE => 'decimal(5,2)',
+ remaining_time => {TYPE => 'decimal(7,2)',
NOTNULL => 1, DEFAULT => '0'},
deadline => {TYPE => 'DATETIME'},
alias => {TYPE => 'varchar(20)'},
@@ -395,7 +395,7 @@ use constant ABSTRACT_SCHEMA => {
REFERENCES => {TABLE => 'profiles',
COLUMN => 'userid'}},
bug_when => {TYPE => 'DATETIME', NOTNULL => 1},
- work_time => {TYPE => 'decimal(5,2)', NOTNULL => 1,
+ work_time => {TYPE => 'decimal(7,2)', NOTNULL => 1,
DEFAULT => '0'},
thetext => {TYPE => 'LONGTEXT', NOTNULL => 1},
isprivate => {TYPE => 'BOOLEAN', NOTNULL => 1,
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__