← Back to team overview

mahara-contributors team mailing list archive

[Bug 1851174] [NEW] 19.10 upgrade is failing at artefact_plans_plan

 

Public bug reported:

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.

** Affects: mahara
     Importance: High
         Status: New

** Affects: mahara/19.10
     Importance: Undecided
         Status: New

** Affects: mahara/20.04
     Importance: High
         Status: New

** Also affects: mahara/20.04
   Importance: High
       Status: New

** Also affects: mahara/19.10
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1851174

Title:
  19.10 upgrade is failing at artefact_plans_plan

Status in Mahara:
  New
Status in Mahara 19.10 series:
  New
Status in Mahara 20.04 series:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1851174/+subscriptions


Follow ups