summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install/DB.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Install/DB.pm')
-rw-r--r--Bugzilla/Install/DB.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 794b7e6e7..705cf3e37 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -759,6 +759,8 @@ sub update_table_definitions {
$dbh->bz_add_column('groups', 'idle_member_removal',
{TYPE => 'INT2', NOTNULL => 1, DEFAULT => '0'});
+ _migrate_preference_categories();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3896,6 +3898,18 @@ sub _migrate_group_owners {
$dbh->do('UPDATE groups SET owner_user_id = ?', undef, $nobody->id);
}
+sub _migrate_preference_categories {
+ my $dbh = Bugzilla->dbh;
+ return if $dbh->bz_column_info('setting', 'category');
+ $dbh->bz_add_column('setting', 'category',
+ {TYPE => 'varchar(64)', NOTNULL => 1, DEFAULT => "'General'"});
+ my @settings = @{ Bugzilla::Install::SETTINGS() };
+ foreach my $params (@settings) {
+ $dbh->do('UPDATE setting SET category = ? WHERE name = ?',
+ undef, $params->{category}, $params->{name});
+ }
+}
+
1;
__END__