Fatal error when trying to run CLI upgrade script after clean install of 15.04dev

Bug #1390318 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Aaron Wells
1.10
Fix Released
High
Aaron Wells
15.04
Fix Released
High
Aaron Wells

Bug Description

To replicate:

1. Do a clean install of Mahara (using either the CLI installer or the web installer.)

2. After install is done, run the upgrade script (either CLI, or by going to /admin/upgrade.php

Expected Results: Since there's nothing to upgrade, it should finish with no problems.

Actual result:

[INF] 7c (admin/cli/upgrade.php:49) Upgrading Mahara
[INF] 7c (lib/mahara.php:221) Upgrading core
[INF] 7c (lib/upgrade.php:1328) Enabled 2 HTML filters.
[DBG] 7c (lib/mahara.php:1760) Field expiry exists. Create skipped
[DBG] 7c (lib/mahara.php:1760) Field expirymailsent exists. Create skipped
[DBG] 7c (lib/mahara.php:1760) Field suspended exists. Create skipped
[DBG] 7c (lib/dml.php:147) postgres7 error: [-18: ERROR: relation "artefact_blog_blogpost_file" does not exist] in adodb_throw(ALTER TABLE "artefact_blog_blogpost_file" RENAME TO "artefact_attachment", )
[DBG] 7c (lib/dml.php:147) Command was: ALTER TABLE "artefact_blog_blogpost_file" RENAME TO "artefact_attachment"
[WAR] 7c (lib/errors.php:745) Could not execute command: ALTER TABLE "artefact_blog_blogpost_file" RENAME TO "artefact_attachment"
Call stack (most recent first):
  * log_message("Could not execute command: ALTER TABLE "artefact_b...", 8, true, true) at /home/aaronw/www/mahara/htdocs/lib/errors.php:95
  * log_warn("Could not execute command: ALTER TABLE "artefact_b...") at /home/aaronw/www/mahara/htdocs/lib/errors.php:745
  * SQLException->__construct("Could not execute command: ALTER TABLE "artefact_b...") at /home/aaronw/www/mahara/htdocs/lib/dml.php:148
  * execute_sql("ALTER TABLE {artefact_blog_blogpost_file} RENAME T...") at /home/aaronw/www/mahara/htdocs/lib/db/upgrade.php:80
  * xmldb_core_upgrade(null) at /home/aaronw/www/mahara/htdocs/lib/upgrade.php:353
  * upgrade_core(object(stdClass)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:253
  * upgrade_mahara(array(size 2)) at /home/aaronw/www/mahara/htdocs/admin/cli/upgrade.php:50

[WAR] 7c (lib/dml.php:148) Could not execute command: ALTER TABLE "artefact_blog_blogpost_file" RENAME TO "artefact_attachment"
Call stack (most recent first):
  * execute_sql("ALTER TABLE {artefact_blog_blogpost_file} RENAME T...") at /home/aaronw/www/mahara/htdocs/lib/db/upgrade.php:80
  * xmldb_core_upgrade(null) at /home/aaronw/www/mahara/htdocs/lib/upgrade.php:353
  * upgrade_core(object(stdClass)) at /home/aaronw/www/mahara/htdocs/lib/mahara.php:253
  * upgrade_mahara(array(size 2)) at /home/aaronw/www/mahara/htdocs/admin/cli/upgrade.php:50

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Used git bisect to identify this commit as the source of the problem:

commit 847754aaacade1430aac99c40c6378b642cf3c1b
Author: Aaron Wells <email address hidden>
Date: Thu Oct 23 12:48:17 2014 +1300

    Add a <meta name="generator"> tag with the Mahara major version number

    Bug 1384497. This also adds a new $config->series to lib/version.php,
    which stores the major version (or as we sometimes call it, "the series")
    of the current release. It seemed better to store this separately rather
    than to try to parse it from $config->release, because we may change
    our release numbering strategy in the future.

    Change-Id: If4c0d7352e9433cdaf54a03bb922356d6c950e7d

The problem is also present in 1.10_STABLE from this commit being backported there. The problem is not present in 1.8_STABLE or 1.9_STABLE, however. Perhaps it was fixed by this commit (present in 1.8_STABLE & 1.9_STABLE but not 1.10_STABLE):

    Fixing a backporting mistake (Bug #1384497)

    Older versions handle the check_upgrades() output
    differently

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

tags: added: regression
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/3941

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

Reviewed: https://reviews.mahara.org/3941
Committed: http://gitorious.org/mahara/mahara/commit/8afae70ec23ea4edd7761b8a91cdeb39c61e88c1
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 8afae70ec23ea4edd7761b8a91cdeb39c61e88c1
Author: Aaron Wells <email address hidden>
Date: Fri Nov 7 18:45:06 2014 +1300

Upgrader always thinks it needs to upgrade core

Bug 1390318

Change-Id: I214a62d9bb4b40e6c8ebbde199177905608e34de

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

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/3945

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

Reviewed: https://reviews.mahara.org/3945
Committed: http://gitorious.org/mahara/mahara/commit/59625807f5b8134075f36c7cc69aa013163b9b9b
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 59625807f5b8134075f36c7cc69aa013163b9b9b
Author: Aaron Wells <email address hidden>
Date: Fri Nov 7 18:45:06 2014 +1300

Upgrader always thinks it needs to upgrade core

Bug 1390318

Change-Id: I214a62d9bb4b40e6c8ebbde199177905608e34de

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.