Commit 7b68e08e authored by Robert Lyon's avatar Robert Lyon

Bug 1798663: Fixing phpunit uninstall

Dealing with the foreign key between installed modules


Change-Id: Ic381249829fe98919b82a79897da4c47daeea87b
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
(cherry picked from commit 8649464f)
parent de470bec
......@@ -700,6 +700,10 @@ abstract class TestingUtil {
log_info("Uninstalling $plugintype.$pluginname");
$location = get_config('docroot') . $pluginpath . DIRECTORY_SEPARATOR . 'db';
if (is_readable($location . DIRECTORY_SEPARATOR . 'install.xml')) {
if ($plugintype == 'auth' && $pluginname == 'webservice') {
// This module has LTI module lti_assessment.oauthserver as a foreign key
execute_sql('ALTER TABLE {lti_assessment} DROP CONSTRAINT {ltiasse_oau_fk}');
if ($plugintype == 'module' && $pluginname == 'framework') {
// This module has a core collection.framework as a foreign key
execute_sql('UPDATE {collection} SET framework = null');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment