Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/390311 )

Change subject: Drop code_authors.ca_repo_author index
......................................................................

Drop code_authors.ca_repo_author index

Bug: T180160
Change-Id: I8b4a372ba9d1843e92a020eaaa9ee85a2ed90623
---
M CodeReviewHooks.php
A archives/code_author-drop-ca_repo_author.sql
D archives/code_authors_repo-index.sql
M codereview.sql
4 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeReview 
refs/changes/11/390311/1

diff --git a/CodeReviewHooks.php b/CodeReviewHooks.php
index 0d7ab0e..e16b195 100644
--- a/CodeReviewHooks.php
+++ b/CodeReviewHooks.php
@@ -88,8 +88,11 @@
                        $updater->addExtensionUpdate( [ 'addField', 
'code_authors', 'ca_user',
                                "$base/archives/code_authors_add_ca_user.sql", 
true ] );
 
-                       $updater->addExtensionUpdate( [ 'addIndex', 
'code_authors', 'ca_repo_author',
-                               "$base/archives/code_authors_repo-index.sql", 
true ] );
+                       $updater->dropExtensionIndex(
+                               'code_authors',
+                               'ca_repo_author',
+                               
"$base/archives/code_author-drop-ca_repo_author.sql"
+                       );
                        break;
                case 'sqlite':
                        $updater->addExtensionTable( 'code_rev', 
"$base/codereview.sql" );
@@ -102,8 +105,6 @@
                                "$base/archives/codereview-repopath.sql", true 
] );
                        $updater->addExtensionUpdate( [ 'addField', 
'code_authors', 'ca_user',
                                "$base/archives/code_authors_add_ca_user.sql", 
true ] );
-                       $updater->addExtensionUpdate( [ 'addIndex', 
'code_authors', 'ca_repo_author',
-                               "$base/archives/code_authors_repo-index.sql", 
true ] );
                        break;
                case 'postgres':
                        // TODO
diff --git a/archives/code_author-drop-ca_repo_author.sql 
b/archives/code_author-drop-ca_repo_author.sql
new file mode 100644
index 0000000..985ff98
--- /dev/null
+++ b/archives/code_author-drop-ca_repo_author.sql
@@ -0,0 +1 @@
+ALTER TABLE /*_*/code_authors DROP INDEX /*i*/ca_repo_author;
\ No newline at end of file
diff --git a/archives/code_authors_repo-index.sql 
b/archives/code_authors_repo-index.sql
deleted file mode 100644
index 8a4e4f8..0000000
--- a/archives/code_authors_repo-index.sql
+++ /dev/null
@@ -1 +0,0 @@
-CREATE INDEX /*i*/ca_repo_author ON /*_*/code_authors (ca_repo_id, ca_author);
diff --git a/codereview.sql b/codereview.sql
index bed5454..8a80995 100644
--- a/codereview.sql
+++ b/codereview.sql
@@ -99,7 +99,6 @@
  -- 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/390311
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b4a372ba9d1843e92a020eaaa9ee85a2ed90623
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

Reply via email to