Problem with upgrade when LTI instance containing submissions exists

Bug #1950413 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 22.04
21.10
High
Unassigned
22.04
High
Unassigned

Bug Description

Get error:
Cannot delete or update a parent row: a foreign key constraint fails in "lti_assessment"

To test:
1) have an older site, say version 20.04 and create a group in the site
2) create a Webservice -> External app for LTI
3) insert a row in lti_assessment table where the 'oauthserver' equals the value from
 SELECT id FROM external_services WHERE shortname = 'maharalti';
4) upgrade site and see error

The problem is the auth/webservice upgrade step happens before module/lti upgrade step but relies on the module/lti step having first.

So we need to move a module/lti step to auth/webservice upgrade to avoid this problem

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "main" branch: https://reviews.mahara.org/12238

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12238
Committed: https://git.mahara.org/mahara/mahara/commit/e776912b818b46394977b9589bb95d822a45c9ae
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit e776912b818b46394977b9589bb95d822a45c9ae
Author: Robert Lyon <email address hidden>
Date: Wed Nov 10 17:04:04 2021 +1300

Bug 1950413: Adjust upgrade for LTI upgrade problem

When we need to change the LTI name before we reset the webservice
components

Change-Id: I051fa748a1a40eb3e9433d34cfa31c90b89321fc
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "21.10_DEV" branch: https://reviews.mahara.org/12309

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12309
Committed: https://git.mahara.org/mahara/mahara/commit/aa2fffe766d7147f28f1da2e30823febe7a80ed7
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.10_DEV

commit aa2fffe766d7147f28f1da2e30823febe7a80ed7
Author: Robert Lyon <email address hidden>
Date: Wed Nov 10 17:04:04 2021 +1300

Bug 1950413: Adjust upgrade for LTI upgrade problem

When we need to change the LTI name before we reset the webservice
components

Change-Id: I051fa748a1a40eb3e9433d34cfa31c90b89321fc
Signed-off-by: Robert Lyon <email address hidden>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers