summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-07-05 17:06:37 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-07-05 17:06:37 +0200
commitea6b82f1303f86e5b62ea23985cc47cea5454f9b (patch)
treea548590aa11314ed2715f10f9394947fb7aea3ab /Bugzilla/Install
parente658f6a3e6af7bbcc68d235a58f2294a47074ab6 (diff)
downloadbugzilla-ea6b82f1303f86e5b62ea23985cc47cea5454f9b.tar.gz
bugzilla-ea6b82f1303f86e5b62ea23985cc47cea5454f9b.tar.xz
Bug 658929 - User autocomplete is very slow when there are lots of users in the profiles table
r/a=mkanat
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/DB.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index af5ddaf82..af276882c 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -651,6 +651,9 @@ sub update_table_definitions {
_populate_bug_see_also_class();
+ # 2011-06-15 dkl@mozilla.com - Bug 658929
+ _migrate_disabledtext_boolean();
+
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
@@ -3573,6 +3576,16 @@ sub _populate_bug_see_also_class {
$dbh->bz_commit_transaction();
}
+sub _migrate_disabledtext_boolean {
+ my $dbh = Bugzilla->dbh;
+ if (!$dbh->bz_column_info('profiles', 'is_enabled')) {
+ $dbh->bz_add_column("profiles", 'is_enabled',
+ {TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});
+ $dbh->do("UPDATE profiles SET is_enabled = 0
+ WHERE disabledtext != ''");
+ }
+}
+
1;
__END__