Reviewed: https://reviews.mahara.org/7369 Committed: https://git.mahara.org/mahara/mahara/commit/8770047332ecd246923a609ee5d37ac2a21f283d Submitter: Robert Lyon ([email protected]) Branch: master
commit 8770047332ecd246923a609ee5d37ac2a21f283d Author: Dmitrii Metelkin <[email protected]> Date: Wed Dec 28 15:06:45 2016 +1100 Bug1651011: Remove unnecessary update hook Removing update hook to prevent failing upgrades from versions older than 16.10. It's safe as the next hook will recreate a table and resync file types. behatnotneeded Change-Id: I285a3f297a8459a8758b29ac0b9f7d4e97f38202 -- 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: Fix Committed Status in Mahara 16.10 series: Fix Committed 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

