Reedy has uploaded a new change for review.
https://gerrit.wikimedia.org/r/76631
Change subject: Add code_authors (ca_repo_id, ca_author) index
......................................................................
Add code_authors (ca_repo_id, ca_author) index
Change-Id: I0c4eac2c62c7dbd09f6b7bb8c6401c529ff60304
---
M CodeReviewHooks.php
A archives/code_authors_repo-index.sql
M codereview.sql
3 files changed, 8 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview
refs/changes/31/76631/1
diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index 19b727f..b33b300 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -68,6 +68,9 @@
"$base/archives/code_drop_cc_review.sql", true
) );
$updater->addExtensionUpdate( array( 'dropTable',
'code_test_suite', "$base/archives/code_drop_test.sql", true ) );
+
+ $updater->addExtensionUpdate( array( 'addIndex',
'code_authors', 'ca_repo_author',
+ "$base/archives/code_authors_repo-index.sql",
true ) );
break;
case 'sqlite':
$updater->addExtensionTable( 'code_rev',
"$base/codereview.sql" );
@@ -78,6 +81,8 @@
"$base/archives/code_signoffs_timestamp_struck.sql", true ) );
$updater->addExtensionUpdate( array( 'addIndex',
'code_paths', 'repo_path',
"$base/archives/codereview-repopath.sql", true
) );
+ $updater->addExtensionUpdate( array( 'addIndex',
'code_authors', 'ca_repo_author',
+ "$base/archives/code_authors_repo-index.sql",
true ) );
break;
case 'postgres':
// TODO
@@ -119,4 +124,4 @@
$files[] = $dir . '/tests/DiffHighlighterTest.php';
return true;
}
-}
\ No newline at end of file
+}
diff --git a/archives/code_authors_repo-index.sql
b/archives/code_authors_repo-index.sql
new file mode 100644
index 0000000..8a4e4f8
--- /dev/null
+++ b/archives/code_authors_repo-index.sql
@@ -0,0 +1 @@
+CREATE INDEX /*i*/ca_repo_author ON /*_*/code_authors (ca_repo_id, ca_author);
diff --git a/codereview.sql b/codereview.sql
index 043cd04..ac12c85 100644
--- a/codereview.sql
+++ b/codereview.sql
@@ -96,6 +96,7 @@
-- Note that multiple authors on the same repo may point to
-- a single local user in some cases...
CREATE UNIQUE INDEX /*i*/ca_user_text ON /*_*/code_authors (ca_user_text,
ca_repo_id, ca_author);
+CREATE INDEX /*i*/ca_repo_author ON /*_*/code_authors (ca_repo_id, ca_author);
--
-- List of which files were changed in a given code revision.
--
To view, visit https://gerrit.wikimedia.org/r/76631
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c4eac2c62c7dbd09f6b7bb8c6401c529ff60304
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits