summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-01-31 04:18:06 +0100
committerGitHub <noreply@github.com>2018-01-31 04:18:06 +0100
commitac80568834a7954046d6dcaed98d9460b3d34b09 (patch)
tree387520e5ea5cce8f69014dd33146100bc1d932d2 /Bugzilla
parent8740a646cfef5795cb05df8ea19dc38b600bf5eb (diff)
downloadbugzilla-ac80568834a7954046d6dcaed98d9460b3d34b09.tar.gz
bugzilla-ac80568834a7954046d6dcaed98d9460b3d34b09.tar.xz
Bug 1433833 - Add index to email_rates.message_ts
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/DB/Schema.pm1
-rw-r--r--Bugzilla/Install/DB.pm4
2 files changed, 5 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 0464466af..3307464db 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -1654,6 +1654,7 @@ use constant ABSTRACT_SCHEMA => {
],
INDEXES => [
email_rates_idx => [qw(recipient message_ts)],
+ email_rates_message_ts_idx => ['message_ts'],
],
},
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 3b1836c26..e6a7a3be0 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -218,6 +218,10 @@ sub update_table_definitions {
$dbh->bz_add_column('profiles', 'emailflags', {TYPE => 'MEDIUMTEXT'});
}
+ if (!$dbh->bz_index_info('email_rates', 'email_rates_message_ts_idx')) {
+ $dbh->bz_add_index( 'email_rates', 'email_rates_message_ts_idx', ['message_ts'] );
+ }
+
$dbh->bz_add_column('groups', 'isactive',
{TYPE => 'BOOLEAN', NOTNULL => 1, DEFAULT => 'TRUE'});