From ea6b82f1303f86e5b62ea23985cc47cea5454f9b Mon Sep 17 00:00:00 2001 From: David Lawrence Date: Tue, 5 Jul 2011 11:06:37 -0400 Subject: Bug 658929 - User autocomplete is very slow when there are lots of users in the profiles table r/a=mkanat --- Bugzilla/Install/DB.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Bugzilla/Install') 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__ -- cgit v1.2.3-24-g4f1b