19.10 upgrade is failing at artefact_plans_plan

Bug #1851174 reported by Lisa Seeto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
High
Robert Lyon
19.10
High
Robert Lyon
20.04
High
Robert Lyon

Bug Description

Upgrading from 19.04 to 19.10 is failing during DB upgrade at table 'artefact_plans_plan':

[WAR] c7 (lib/dml.php:540) Failed to get a recordset: postgres8 error: [-18: ERROR: relation "artefact_plans_plan" does not exist
[WAR] c7 (lib/dml.php:540) LINE 1: SELECT * FROM "artefact_plans_plan" WHERE "artefact" = $1 ...
[WAR] c7 (lib/dml.php:540) ^] in adodb_throw(SELECT * FROM "artefact_plans_plan" WHERE "artefact" = ? LIMIT 2, Array)Command was: SELECT * FROM "artefact_plans_plan" WHERE "artefact" = ? and values was (0:282)
Call stack (most recent first):
  * get_recordset_sql(string(size 58), array(size 1), integer, integer) at /var/www/copy-welcome-prod-mahara/releases/20191103221101/lib/dml.php:359
  * get_record_sql(string(size 58), array(size 1), integer) at /var/www/copy-welcome-prod-mahara/releases/20191103221101/lib/dml.php:328
  * get_record(string(size 19), string(size 8), string(size 3)) at /var/www/copy-welcome-prod-mahara/releases/20191103221101/artefact/plans/lib.php:210

This is due to the upgrade being out of synch in the creation of the artefact_plans_plan table:
/artefact/plans/db/upgrade.php:

    if ($oldversion < 2019071700) {
        $table = new XMLDBTable('artefact_plans_plan');
...

and lib/db/upgrade.php:

    if ($oldversion < 2019040900) {
        log_debug('Updating plan blocktype in view version');
...

 and trying to read from that table.

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

Patch for "master" branch: https://reviews.mahara.org/10556

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

Reviewed: https://reviews.mahara.org/10556
Committed: https://git.mahara.org/mahara/mahara/commit/a57890d977f792fd2e899037fb4889d2101aab24
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit a57890d977f792fd2e899037fb4889d2101aab24
Author: Robert Lyon <email address hidden>
Date: Mon Nov 4 11:50:28 2019 +1300

Bug 1851174: Don't use the call to plan class on upgrade

Before the new tables exist that plan class needs

behatnotneeded

Change-Id: I6acce6b7c2e97d9ef0b4bcf53096081c631038f1
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 "19.10_STABLE" branch: https://reviews.mahara.org/10589

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

Reviewed: https://reviews.mahara.org/10589
Committed: https://git.mahara.org/mahara/mahara/commit/f1f16e6c9c15024532a1fd658841d02fbd1505cd
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 19.10_STABLE

commit f1f16e6c9c15024532a1fd658841d02fbd1505cd
Author: Robert Lyon <email address hidden>
Date: Mon Nov 4 11:50:28 2019 +1300

Bug 1851174: Don't use the call to plan class on upgrade

Before the new tables exist that plan class needs

behatnotneeded

Change-Id: I6acce6b7c2e97d9ef0b4bcf53096081c631038f1
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit a57890d977f792fd2e899037fb4889d2101aab24)

Changed in mahara:
status: Fix Committed → Fix Released
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.04.0 → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers