Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65410

Unable to upgrade to latest 3.7 - duplicate entry core_message-message_conversations

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Duplicate
    • Affects Version/s: 3.7
    • Fix Version/s: None
    • Component/s: Favourites, Messages
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE

      Description

      As noticed by Mary Cooch, we are experiencing the following upgrade error on hq.moodle.com when upgrading Moodle database from version 3.7dev+ (Build: 20190418) (2019041800) to 3.7dev+ (Build: 20190423) (2019042300)

      -->System
      Default exception handler: Error writing to database Debug: Duplicate entry 'core_message-message_conversations-7465-34-22' for key 'mdl_favo_comiteiteconuse_uix'
      INSERT INTO mdl_favourite (component,itemtype,itemid,contextid,userid,timecreated,timemodified) VALUES(?,?,?,?,?,?,?)
      [array (
        0 => 'core_message',
        1 => 'message_conversations',
        2 => '7465',
        3 => 34,
        4 => '22',
        5 => 1556092541,
        6 => 1556092541,
      )]
      Error code: dmlwriteexception
      * line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
      * line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      * line 3031 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->insert_record()
      * line 1809 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 180 of /admin/cli/upgrade.php: call to upgrade_core()
       
      !!! Error writing to database !!!
      !! Duplicate entry 'core_message-message_conversations-7465-34-22' for key 'mdl_favo_comiteiteconuse_uix'
      INSERT INTO mdl_favourite (component,itemtype,itemid,contextid,userid,timecreated,timemodified) VALUES(?,?,?,?,?,?,?)
      [array (
        0 => 'core_message',
        1 => 'message_conversations',
        2 => '7465',
        3 => 34,
        4 => '22',
        5 => 1556092541,
        6 => 1556092541,
      )]
      Error code: dmlwriteexception !!
      !! Stack trace: * line 489 of /lib/dml/moodle_database.php: dml_write_exception thrown
      * line 1329 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      * line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      * line 3031 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->insert_record()
      * line 1809 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 180 of /admin/cli/upgrade.php: call to upgrade_core()
       !!
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 45 minutes
                  45m