Ladsgroup has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/309818

Change subject: Revert "Add UNIQUE indexes to ores_classification"
......................................................................

Revert "Add UNIQUE indexes to ores_classification"

This reverts commit 9fea7ef6e1b025fd41eef1d8aff39ad8ea08472a.

Change-Id: I750be6860c11fc48bd77234a1566c57167e1b7ff
---
M includes/Hooks.php
M sql/ores_classification.sql
D sql/patch-ores-classification-unique-indexes.sql
3 files changed, 2 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/18/309818/1

diff --git a/includes/Hooks.php b/includes/Hooks.php
index c4cbd93..60d3f76 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -31,8 +31,6 @@
                $updater->addExtensionTable( 'ores_model', __DIR__ . 
'/../sql/ores_model.sql' );
                $updater->dropExtensionIndex( 'ores_classification', 
'oresc_rev',
                        __DIR__ . 
'/../sql/patch-ores-classification-indexes.sql' );
-               $updater->addExtensionIndex( 'ores_classification', 
'oresc_rev_model_class',
-                       __DIR__ . 
'/../sql/patch-ores-classification-unique-indexes.sql' );
 
                return true;
        }
diff --git a/sql/ores_classification.sql b/sql/ores_classification.sql
index 067da78..8ff25e4 100644
--- a/sql/ores_classification.sql
+++ b/sql/ores_classification.sql
@@ -9,7 +9,7 @@
        oresc_rev INTEGER(10) unsigned NOT NULL,
        -- Model name (foreign key to ores_model.oresm_id)
        oresc_model SMALLINT NOT NULL,
-       -- Classification title (see $wgOresModelClasses)
+       -- Classification title
        oresc_class TINYINT NOT NULL,
        -- Estimated classification probability
        oresc_probability DECIMAL(3,3) NOT NULL,
@@ -18,5 +18,4 @@
        oresc_is_predicted TINYINT(1) NOT NULL
 ) /*$wgDBTableOptions*/;
 
-CREATE UNIQUE INDEX /*i*/oresc_rev_model_class ON /*_*/ores_classification 
(oresc_rev, oresc_model, oresc_class);
-CREATE UNIQUE INDEX /*i*/oresc_rev_predicted_model ON /*_*/ores_classification 
(oresc_rev, oresc_is_predicted, oresc_model);
+CREATE INDEX /*i*/oresc_winner ON /*_*/ores_classification (oresc_rev, 
oresc_is_predicted);
diff --git a/sql/patch-ores-classification-unique-indexes.sql 
b/sql/patch-ores-classification-unique-indexes.sql
deleted file mode 100644
index 8b6bd58..0000000
--- a/sql/patch-ores-classification-unique-indexes.sql
+++ /dev/null
@@ -1,8 +0,0 @@
---
--- patch-ores-classification-unique-indexes.sql
---
--- Add unique indexes, and drop oresc_winner (redundant with 
oresc_rev_predicted_model)
-
-DROP INDEX /*i*/oresc_winner ON /*_*/ores_classification;
-CREATE UNIQUE INDEX /*i*/oresc_rev_model_class ON /*_*/ores_classification 
(oresc_rev, oresc_model, oresc_class);
-CREATE UNIQUE INDEX /*i*/oresc_rev_predicted_model ON /*_*/ores_classification 
(oresc_rev, oresc_is_predicted, oresc_model);

-- 
To view, visit https://gerrit.wikimedia.org/r/309818
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I750be6860c11fc48bd77234a1566c57167e1b7ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to