summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-10-15 22:52:27 +0200
committerDavid Lawrence <dkl@mozilla.com>2015-10-15 22:52:27 +0200
commitb21167f4de2d29d7ce4a7cd07266783032099568 (patch)
tree4cc00b2c346516188b243cebbeb656b262c0a91a /Bugzilla/Install
parent2e2981d25c185fde56f29c7aed4e3e6bba50039e (diff)
downloadbugzilla-b21167f4de2d29d7ce4a7cd07266783032099568.tar.gz
bugzilla-b21167f4de2d29d7ce4a7cd07266783032099568.tar.xz
Bug 1209599 - group general preferences by category (schema only)
Diffstat (limited to 'Bugzilla/Install')
-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__