jenkins-bot has submitted this change and it was merged.

Change subject: Improve table structure of math_wmc_results
......................................................................


Improve table structure of math_wmc_results

Change-Id: I7e4eb13cedbe6858b824c788e8b63d564f25d315
---
M db/math_wmc_results.sql
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Physikerwelt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/db/math_wmc_results.sql b/db/math_wmc_results.sql
index 7a4f67e..374f9c1 100644
--- a/db/math_wmc_results.sql
+++ b/db/math_wmc_results.sql
@@ -1,14 +1,14 @@
-CREATE TABLE math_wmc_results
-(
+CREATE TABLE math_wmc_results (
     resultId INT PRIMARY KEY NOT NULL,
     qId INT NOT NULL,
     rank INT NOT NULL,
     runId INT NOT NULL,
-    oldId INT NOT NULL,
+    oldId INT(10) UNSIGNED NOT NULL,
     fId INT NOT NULL,
-    FOREIGN KEY ( runId ) REFERENCES math_wmc_runs ( runId ),
+    UNIQUE KEY uniqueRanks( runId, qId, rank ),
+    KEY runId_idx( runId ),
+    KEY qId_idx( qId ),
+    KEY qId_oldId_idx ( qId, oldId ),
+    FOREIGN KEY ( runId ) REFERENCES math_wmc_runs ( runId ) ON DELETE CASCADE,
     FOREIGN KEY ( oldId ) REFERENCES revision ( rev_id )
-);
-CREATE INDEX idx_wmc_results_qid ON math_wmc_results ( qId );
-CREATE INDEX idx_wmc_results_run ON math_wmc_results ( runId );
-CREATE INDEX idx_wmc_results_qid_curid ON math_wmc_results ( qId, oldId );
+);
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e4eb13cedbe6858b824c788e8b63d564f25d315
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to