Physikerwelt has submitted this change and it was merged.

Change subject: Delete math index entries for deleted revisions
......................................................................


Delete math index entries for deleted revisions

Cascade deleting of page revisions to the corresponding
math index entries

* Change mysql statement for table creation

Since MathSearch is still experimental no automatic schema updates
are provided.
A manual fix, if the MathSearch extension had been deployed before,
would be the following:

ALTER TABLE wiki.mathindex DROP FOREIGN KEY mathindex_ibfk_2;

ALTER TABLE wiki.mathindex ADD FOREIGN KEY (mathindex_revision_id)
REFERENCES revision(rev_id) ON DELETE CASCADE;

Bug: T105469
Change-Id: Ic3386e22b187e6100d294d5e79ec56781a40e083
---
M db/mathindex.sql
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/db/mathindex.sql b/db/mathindex.sql
index 49d0601..9893fc9 100644
--- a/db/mathindex.sql
+++ b/db/mathindex.sql
@@ -21,6 +21,6 @@
 
   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 )
+  FOREIGN KEY ( /*i*/mathindex_revision_id ) REFERENCES revision( rev_id ) ON 
DELETE CASCADE
 
 ) /*$wgDBTableOptions*/;
\ No newline at end of file

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

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

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

Reply via email to