← Back to team overview

mahara-contributors team mailing list archive

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

 

Same error when upgrading from 1.2.6 to 1.3.3 and 1.3.4, different
section of the DB:

Errors:

[WAR] 42 (lib/errors.php:743) Failed to get a recordset: mysql error: [1452: Cannot add or update a child row: a foreign key constraint fails ("portfolio_mahara"."notification_internal_activity", CONSTRAINT "notiinteacti_fro_fk" FOREIGN KEY ("from") REFERENCES "usr" ("id"))] in adodb_throw(UPDATE "notification_internal_activity" SET "from" = '2'  WHERE "id" = '110' , )
Command was: UPDATE "notification_internal_activity" SET "from" = ?  WHERE "id" = ?  and values was (2,110)
[X]
Call stack (most recent first):

    log_message("Failed to get a recordset: mysql error: [1452: Can...", 8, true, true) at /usr/share/mahara1/htdocs/lib/errors.php:109
    log_warn("Failed to get a recordset: mysql error: [1452: Can...") at /usr/share/mahara1/htdocs/lib/errors.php:743
    SQLException->__construct("Failed to get a recordset: mysql error: [1452: Can...") at /usr/share/mahara1/htdocs/lib/dml.php:902
    set_field_select("notification_internal_activity", "from", "2", " WHERE "id" = ? ", array(size 1)) at /usr/share/mahara1/htdocs/lib/dml.php:881
    set_field("notification_internal_activity", "from", "2", "id", "110") at /usr/share/mahara1/htdocs/lib/db/upgrade.php:1713
    xmldb_core_upgrade("2009111017") at /usr/share/mahara1/htdocs/lib/upgrade.php:301
    upgrade_core(object(stdClass)) at /usr/share/mahara1/htdocs/admin/upgrade.json.php:93

Message:

Could not execute command: ALTER TABLE notification_internal_activity ADD CONSTRAINT notiinteacti_par_fk FOREIGN KEY (parent) REFERENCES notification_internal_activity (id)
Call stack (most recent first):

    execute_sql("ALTER TABLE notification_internal_activity ADD CON...", true) at /usr/share/mahara1/htdocs/lib/dml.php:1406
    execute_sql_arr(array(size 1), true, true) at /usr/share/mahara1/htdocs/lib/ddl.php:972
    add_key(object(XMLDBTable), object(XMLDBKey)) at /usr/share/mahara1/htdocs/lib/db/upgrade.php:1694
    xmldb_core_upgrade("2009111017") at /usr/share/mahara1/htdocs/lib/upgrade.php:301
    upgrade_core(object(stdClass)) at /usr/share/mahara1/htdocs/admin/upgrade.json.php:93

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