summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDave Lawrence <dkl@redhat.com>2010-08-31 06:20:07 +0200
committerDave Lawrence <dkl@redhat.com>2010-08-31 06:20:07 +0200
commit77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d (patch)
treea813d550674b01ce0c6d3d63e9f4f0b619841b31 /Bugzilla/Install
parentc75bcea5f0510417a1f6a14b2f88f2249b3a4109 (diff)
downloadbugzilla-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar.gz
bugzilla-77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d.tar.xz
Bug 77193 - Add the ability to retire (disable) old versions, components and milestones
r/a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 21739fab9..df4ea737e 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -631,6 +631,9 @@ sub update_table_definitions {
# 2010-07-18 LpSolit@gmail.com - Bug 119703
_remove_attachment_isurl();
+ # 2009-05-07 ghendricks@novell.com - Bug 77193
+ _add_isactive_to_product_fields();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3397,6 +3400,26 @@ sub _remove_attachment_isurl {
}
}
+sub _add_isactive_to_product_fields {
+ my $dbh = Bugzilla->dbh;
+
+ # If we add the isactive column all values should start off as active
+ if (!$dbh->bz_column_info('components', 'isactive')) {
+ $dbh->bz_add_column('components', 'isactive',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
+ }
+
+ if (!$dbh->bz_column_info('versions', 'isactive')) {
+ $dbh->bz_add_column('versions', 'isactive',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
+ }
+
+ if (!$dbh->bz_column_info('milestones', 'isactive')) {
+ $dbh->bz_add_column('milestones', 'isactive',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
+ }
+}
+
sub _migrate_field_visibility_value {
my $dbh = Bugzilla->dbh;