jenkins-bot has submitted this change and it was merged.
Change subject: Add code_authors (ca_repo_id, ca_author) index
......................................................................
Add code_authors (ca_repo_id, ca_author) index
Change-Id: I0c4eac2c62c7dbd09f6b7bb8c6401c529ff60304
---
M CodeReview.php
M CodeReviewHooks.php
A archives/code_authors_repo-index.sql
M codereview.sql
4 files changed, 10 insertions(+), 3 deletions(-)
Approvals:
Reedy: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CodeReview.php b/CodeReview.php
index 35b0578..f58be1e 100644
--- a/CodeReview.php
+++ b/CodeReview.php
@@ -34,7 +34,7 @@
$wgExtensionCredits['specialpage'][] = array(
'path' => __FILE__,
'name' => 'CodeReview',
- 'version' => '1.15',
+ 'version' => '1.16',
'url' => 'https://www.mediawiki.org/wiki/Extension:CodeReview',
'author' => array( 'Brion Vibber', 'Aaron Schulz', 'Alexandre
Emsenhuber', 'Chad Horohoe', 'Sam Reed', 'Roan Kattouw' ),
'descriptionmsg' => 'codereview-desc',
@@ -352,4 +352,4 @@
/******** UNIT TESTS ********/
-$wgHooks['UnitTestsList'][] = 'CodeReviewHooks::onUnitTestsList';
\ No newline at end of file
+$wgHooks['UnitTestsList'][] = 'CodeReviewHooks::onUnitTestsList';
diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index a0fbfce..10aeda6 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -71,6 +71,9 @@
$updater->addExtensionUpdate( array( 'addField',
'code_authors', 'ca_user',
"$base/archives/code_authors_add_ca_user.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" );
@@ -83,6 +86,8 @@
"$base/archives/codereview-repopath.sql", true
) );
$updater->addExtensionUpdate( array( 'addField',
'code_authors', 'ca_user',
"$base/archives/code_authors_add_ca_user.sql",
true ) );
+ $updater->addExtensionUpdate( array( 'addIndex',
'code_authors', 'ca_repo_author',
+ "$base/archives/code_authors_repo-index.sql",
true ) );
break;
case 'postgres':
// TODO
@@ -138,4 +143,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 8a80995..bed5454 100644
--- a/codereview.sql
+++ b/codereview.sql
@@ -99,6 +99,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: merged
Gerrit-Change-Id: I0c4eac2c62c7dbd09f6b7bb8c6401c529ff60304
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CodeReview
Gerrit-Branch: master
Gerrit-Owner: Reedy <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits