← Back to team overview

mahara-contributors team mailing list archive

[Bug 1651011] Re: Issue upgrading Mahara site to 17.04dev

 

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

** No longer affects: mahara/16.10

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

** Changed in: mahara/16.10
       Status: New => In Progress

** Changed in: mahara/16.10
   Importance: Undecided => High

** Changed in: mahara/16.10
    Milestone: None => 16.10.2

-- 
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/1651011

Title:
  Issue upgrading Mahara site to 17.04dev

Status in Mahara:
  In Progress
Status in Mahara 16.10 series:
  In Progress

Bug description:
  This issue arose from bug #1647885. The upgrade fails because the
  primary key is incorrect in the table artefact_file_mime_types

  Robert sayd: Rather than dropping and re-creating the table, it would
  be better to truncate the table and change the primary key. That way,
  the table structure stays the same.

  To replicate:

  1. Install 16.04 and go through the regular setup steps.
  2. Upgrade to master
  Expected result: The upgrade completes. Actual result: Upgrade fails on artefact.file with the following error message, which can only be seen when you attempt to run the upgrade again:

  [DBG] 0e (artefact/file/db/upgrade.php:446) Drop the old primary key constraint and add new id column from/to the table artefact_file_mime_types
  [DBG] 0e (lib/dml.php:157) postgres8 error: [-1: ERROR:  multiple primary keys for table "artefact_file_mime_types" are not allowed] in adodb_throw(ALTER TABLE "artefact_file_mime_types"
                              DROP CONSTRAINT IF EXISTS "artefilemimetype_mim_pk",
                              ADD COLUMN id SERIAL PRIMARY KEY, )
  Command was: ALTER TABLE "artefact_file_mime_types"
                              DROP CONSTRAINT IF EXISTS "artefilemimetype_mim_pk",
                              ADD COLUMN id SERIAL PRIMARY KEY
  [WAR] 0e (lib/errors.php:859) Could not execute command: ALTER TABLE "artefact_file_mime_types"
                              DROP CONSTRAINT IF EXISTS "artefilemimetype_mim_pk",
                              ADD COLUMN id SERIAL PRIMARY KEY
  Call stack (most recent first):

      log_message(string(size 207), integer, true, true) at /home/kristina/code/mahara/htdocs/lib/errors.php:95
      log_warn(string(size 207)) at /home/kristina/code/mahara/htdocs/lib/errors.php:859
      SQLException->__construct(string(size 207)) at /home/kristina/code/mahara/htdocs/lib/dml.php:158
      execute_sql(string(size 180)) at /home/kristina/code/mahara/htdocs/artefact/file/db/upgrade.php:450
      xmldb_artefact_file_upgrade(string(size 10)) at /home/kristina/code/mahara/htdocs/lib/upgrade.php:423
      upgrade_plugin(object(stdClass)) at /home/kristina/code/mahara/htdocs/admin/upgrade.json.php:87

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


References