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

Change subject: Revert introduction of foreign key for hash
......................................................................


Revert introduction of foreign key for hash

* Revert the change for now since it breaks the testing
  framework.

Change-Id: I5812d172f1bb8083881741d796876b450eb24000
---
M MathSearch.hooks.php
M db/mathindex.sql
A db/patches/mathindexHashConstraint.sql
3 files changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/MathSearch.hooks.php b/MathSearch.hooks.php
index 8763749..b8738e8 100644
--- a/MathSearch.hooks.php
+++ b/MathSearch.hooks.php
@@ -57,6 +57,11 @@
                                $updater->addExtensionTable( 
'math_wmc_assessed_revision',
                                        $wmcDir . 
"math_wmc_assessed_revision.sql" );
                        }
+                       if ( $updater->tableExists( 'mathlatexml' ) ) {
+                               // temporary workaround for T117659
+                               // $updater->addExtensionIndex( 'mathindex', 
'fk_mathindex_hash',
+                               // "$dir/patches/mathindexHashConstraint.sql" );
+                       }
                } else {
                        throw new Exception( "Math extension does not currently 
support $type database." );
                }
diff --git a/db/mathindex.sql b/db/mathindex.sql
index 3859367..4a7e5d3 100644
--- a/db/mathindex.sql
+++ b/db/mathindex.sql
@@ -20,7 +20,6 @@
   mathindex_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP,
 
   PRIMARY KEY (mathindex_revision_id,mathindex_anchor),
-  FOREIGN KEY ( /*i*/mathindex_inputhash ) REFERENCES mathlatexml( 
math_inputhash ),
   FOREIGN KEY ( /*i*/mathindex_revision_id ) REFERENCES revision( rev_id ) ON 
DELETE CASCADE
 
 ) /*$wgDBTableOptions*/;
\ No newline at end of file
diff --git a/db/patches/mathindexHashConstraint.sql 
b/db/patches/mathindexHashConstraint.sql
new file mode 100644
index 0000000..9d2467a
--- /dev/null
+++ b/db/patches/mathindexHashConstraint.sql
@@ -0,0 +1,5 @@
+ALTER TABLE /*_*/mathindex
+  ADD CONSTRAINT fk_mathindex_hash
+  FOREIGN KEY ( /*i*/mathindex_inputhash )
+  REFERENCES /*_*/mathlatexml( math_inputhash )
+  ON DELETE CASCADE;
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5812d172f1bb8083881741d796876b450eb24000
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt <[email protected]>
Gerrit-Reviewer: Dyiop <[email protected]>
Gerrit-Reviewer: Hcohl <[email protected]>
Gerrit-Reviewer: Physikerwelt <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: Whyameri <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to