← Back to team overview

mahara-contributors team mailing list archive

[Bug 728837] Re: Upgrade broken from 1.2.6 to 1.3.0

 

The original problem from Michele, and the "Error in foreign key
constraint creation ... A foreign key constraint ... already exists"
look like the kind of thing you get in MySQL when you run an upgrade
twice on the same db.

But the first error from Darren (1452: Cannot add or update a child row:
a foreign key constraint fails ... UPDATE
"notification_internal_activity" SET "from" = '2' WHERE "id" = '110')
looks like it might be a real upgrade bug.  It would be good to know
exactly what's in the db before that.  If there's no user with id 2,
then it shouldn't be trying to add a reference to one.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/728837

Title:
  Upgrade broken from 1.2.6 to 1.3.0

Status in Mahara ePortfolio:
  Triaged

Bug description:
  Michele Balazs reported the following error when trying to upgrade her
  site from 1.2.3 to 1.3.3:

  Could not execute command: ALTER TABLE mah_artefact ADD CONSTRAINT mah_arte_aut_fk FOREIGN KEY (author) REFERENCES mah_usr (id)
  Call stack (most recent first):

      * execute_sql("ALTER TABLE mah_artefact ADD CONSTRAINT mah_arte_a...", true) at/srv/www/mahara/lib/dml.php:1406
      * execute_sql_arr(array(size 1), true, true) at /srv/www/mahara/lib/ddl.php:972
      * add_key(object(XMLDBTable), object(XMLDBKey)) at/srv/www/mahara/lib/db/upgrade.php:1487
      * xmldb_core_upgrade("2009111010") at /srv/www/mahara/lib/upgrade.php:301
      * upgrade_core(object(stdClass)) at /srv/www/mahara/admin/upgrade.json.php:93

  She was also able to narrow it down to the upgrade between 1.2.6 and
  1.3.0 (thanks Michele!).

  mysql: 5.0.67
  php: 5.2.12

  See forum thread:
  http://mahara.org/interaction/forum/topic.php?id=2884



References