From 77b3addad28c0f3ffc1fb4db1fcdc00527aeb48d Mon Sep 17 00:00:00 2001 From: Dave Lawrence Date: Tue, 31 Aug 2010 00:20:07 -0400 Subject: Bug 77193 - Add the ability to retire (disable) old versions, components and milestones r/a=mkanat --- Bugzilla/Install/DB.pm | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Bugzilla/Install/DB.pm') 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; -- cgit v1.2.3-24-g4f1b