From eb13c383198a1c52a7858fdf3fee0248262bbaf0 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Thu, 12 Jun 2014 17:21:54 -0400 Subject: Bug 1022923 - Add index to bug_user_last_visit.last_visit_ts r/a=glob --- Bugzilla/DB/Schema.pm | 3 ++- Bugzilla/Install/DB.pm | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'Bugzilla') diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm index cf404f4ca..632ab639b 100644 --- a/Bugzilla/DB/Schema.pm +++ b/Bugzilla/DB/Schema.pm @@ -1729,7 +1729,8 @@ use constant ABSTRACT_SCHEMA => { ], INDEXES => [ bug_user_last_visit_idx => {FIELDS => ['user_id', 'bug_id'], - TYPE => 'UNIQUE'} + TYPE => 'UNIQUE'}, + bug_user_last_visit_last_visit_ts_idx => ['last_visit_ts'], ], }, }; diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm index d9bc494e0..9e197a907 100644 --- a/Bugzilla/Install/DB.pm +++ b/Bugzilla/Install/DB.pm @@ -714,6 +714,11 @@ sub update_table_definitions { # 2013-08-26 sgreen@redhat.com - Bug 903895 _fix_components_primary_key(); + # 2014-06-09 dylan@mozilla.com - Bug 1022923 + $dbh->bz_add_index('bug_user_last_visit', + 'bug_user_last_visit_last_visit_ts_idx', + ['last_visit_ts']); + ################################################################ # New --TABLE-- changes should go *** A B O V E *** this point # ################################################################ -- cgit v1.2.3-24-g4f1b