summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbugreport%peshkin.net <>2005-02-12 23:19:52 +0100
committerbugreport%peshkin.net <>2005-02-12 23:19:52 +0100
commitd2664956a3387b9b969f1c1bec7dc615f95bc9a7 (patch)
tree9fbee76025f8921c431f1f468ab5d4a8a803d8cc
parent882b1b2e6103563320be1f8f4c2a5aa46dc491fa (diff)
downloadbugzilla-d2664956a3387b9b969f1c1bec7dc615f95bc9a7.tar.gz
bugzilla-d2664956a3387b9b969f1c1bec7dc615f95bc9a7.tar.xz
Bug 281787: Add index for attachments.submitter_id and bugs_activity.who
r,a=justdave
-rwxr-xr-xchecksetup.pl12
1 files changed, 12 insertions, 0 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 3655087dd..c2a111b63 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1672,6 +1672,7 @@ $table{bugs_activity} =
removed tinytext,
index (bug_id),
+ index (who),
index (bug_when),
index (fieldid)';
@@ -1690,6 +1691,7 @@ $table{attachments} =
isprivate tinyint not null default 0,
index(bug_id),
+ index(submitter_id),
index(creation_ts)';
# September 2002 myk@mozilla.org: Tables to support status flags,
@@ -4732,6 +4734,16 @@ if (($fielddef = GetFieldDef("bugs", "delta_ts")) &&
ChangeFieldType ('bugs', 'delta_ts', 'DATETIME NOT NULL');
}
+# 2005-02-12 bugreport@peshkin.net, bug 281787
+if (!defined GetIndexDef('attachments','submitter_id')) {
+ print "Adding index for submitter_id column in attachments table...\n";
+ $dbh->do('ALTER TABLE attachments ADD INDEX (submitter_id)');
+}
+if (!defined GetIndexDef('bugs_activity','who')) {
+ print "Adding index for who column in bugs_activity table...\n";
+ $dbh->do('ALTER TABLE bugs_activity ADD INDEX (who)');
+}
+
#
# Final checks...