From ef32a98bed6dbe5a1b90963c3b2dd21efcc8f545 Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Mon, 26 Mar 2012 12:12:37 +0100 Subject: Make Target Milestone field have the same maximum length as Version field. r,a=LpSolit. https://bugzilla.mozilla.org/show_bug.cgi?id=448551 --- Bugzilla/Constants.pm | 2 +- Bugzilla/DB/Schema.pm | 6 +++--- Bugzilla/Install/DB.pm | 20 ++++++++++---------- .../en/default/admin/milestones/create.html.tmpl | 2 +- template/en/default/admin/milestones/edit.html.tmpl | 2 +- .../en/default/admin/products/edit-common.html.tmpl | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm index 6ce19ad3c..279405c74 100644 --- a/Bugzilla/Constants.pm +++ b/Bugzilla/Constants.pm @@ -524,7 +524,7 @@ use constant MAX_CLASSIFICATION_SIZE => 64; use constant MAX_PRODUCT_SIZE => 64; # The longest milestone name allowed. -use constant MAX_MILESTONE_SIZE => 20; +use constant MAX_MILESTONE_SIZE => 64; # The longest component name allowed. use constant MAX_COMPONENT_SIZE => 64; diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index 9267a3fea..4c89b1870 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -257,7 +257,7 @@ use constant ABSTRACT_SCHEMA => { COLUMN => 'id'}}, resolution => {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "''"}, - target_milestone => {TYPE => 'varchar(20)', + target_milestone => {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"}, qa_contact => {TYPE => 'INT3', REFERENCES => {TABLE => 'profiles', @@ -748,7 +748,7 @@ use constant ABSTRACT_SCHEMA => { REFERENCES => {TABLE => 'products', COLUMN => 'id', DELETE => 'CASCADE'}}, - value => {TYPE => 'varchar(20)', NOTNULL => 1}, + value => {TYPE => 'varchar(64)', NOTNULL => 1}, sortkey => {TYPE => 'INT2', NOTNULL => 1, DEFAULT => 0}, isactive => {TYPE => 'BOOLEAN', NOTNULL => 1, @@ -1288,7 +1288,7 @@ use constant ABSTRACT_SCHEMA => { description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1}, isactive => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 1}, - defaultmilestone => {TYPE => 'varchar(20)', + defaultmilestone => {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"}, allows_unconfirmed => {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'}, diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index 5bd8fc790..fc8394d91 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -1,4 +1,4 @@ -# This Source Code Form is subject to the terms of the Mozilla Public +11# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # @@ -180,15 +180,6 @@ sub update_table_definitions { _populate_milestones_table(); - # 2000-03-22 Changed the default value for target_milestone to be "---" - # (which is still not quite correct, but much better than what it was - # doing), and made the size of the value field in the milestones table match - # the size of the target_milestone field in the bugs table. - $dbh->bz_alter_column('bugs', 'target_milestone', - {TYPE => 'varchar(20)', NOTNULL => 1, DEFAULT => "'---'"}); - $dbh->bz_alter_column('milestones', 'value', - {TYPE => 'varchar(20)', NOTNULL => 1}); - _add_products_defaultmilestone(); # 2000-03-24 Added unique indexes into the cc and keyword tables. This @@ -666,6 +657,15 @@ sub update_table_definitions { $dbh->bz_add_index('profile_search', 'profile_search_user_id_idx', [qw(user_id)]); } + # 2012-03-23 LpSolit@gmail.com - Bug 448551 + $dbh->bz_alter_column('bugs', 'target_milestone', + {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"}); + + $dbh->bz_alter_column('milestones', 'value', {TYPE => 'varchar(64)', NOTNULL => 1}); + + $dbh->bz_alter_column('products', 'defaultmilestone', + {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'---'"}); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ diff --git a/template/en/default/admin/milestones/create.html.tmpl b/template/en/default/admin/milestones/create.html.tmpl index 503801164..8006c0cd0 100644 --- a/template/en/default/admin/milestones/create.html.tmpl +++ b/template/en/default/admin/milestones/create.html.tmpl @@ -24,7 +24,7 @@ - diff --git a/template/en/default/admin/milestones/edit.html.tmpl b/template/en/default/admin/milestones/edit.html.tmpl index 432de5d8d..759bd708a 100644 --- a/template/en/default/admin/milestones/edit.html.tmpl +++ b/template/en/default/admin/milestones/edit.html.tmpl @@ -25,7 +25,7 @@ - diff --git a/template/en/default/admin/products/edit-common.html.tmpl b/template/en/default/admin/products/edit-common.html.tmpl index 615f61fc7..2b76c44ac 100644 --- a/template/en/default/admin/products/edit-common.html.tmpl +++ b/template/en/default/admin/products/edit-common.html.tmpl @@ -62,7 +62,7 @@ [% END %] [% ELSE %] - [% END %] -- cgit v1.2.3-24-g4f1b