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

Unable to upgrade from 3.11 to 4.0 for Oracle db

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not a bug
    • 4.0
    • None
    • Database SQL/XMLDB
    • MOODLE_400_STABLE

    Description

      Can't run upgrade from 3.11 to 4.0 - getting the exception.

      Steps to reproduce:

      1. Install fresh 311 moodle with oracle db
      2. Restore the attached course
      3. Update code to 4.0
      4. Run php admin/cli/upgrade.php
        Observe this:

      Default exception handler: DDL sql execution error Debug: ORA-01408: such column list already indexed
      CREATE UNIQUE INDEX m_badgback_useext2_uix ON m_badge_backpack (CASE WHEN externalbackpackid IS NOT NULL THEN userid ELSE NULL END, CASE WHEN externalbackpackid IS NOT NULL THEN externalbackpackid ELSE NULL END)
      Error code: ddlexecuteerror
      * line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
      * line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      * line 896 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      * line 77 of /lib/ddl/database_manager.php: call to oci_native_moodle_database->change_database_structure()
      * line 758 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
      * line 2263 of /lib/db/upgrade.php: call to database_manager->add_key()
      * line 1875 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 196 of /admin/cli/upgrade.php: call to upgrade_core()
       
      !!! DDL sql execution error !!!
      !! ORA-01408: such column list already indexed
      CREATE UNIQUE INDEX m_badgback_useext2_uix ON m_badge_backpack (CASE WHEN externalbackpackid IS NOT NULL THEN userid ELSE NULL END, CASE WHEN externalbackpackid IS NOT NULL THEN externalbackpackid ELSE NULL END)
      Error code: ddlexecuteerror !!
      !! Stack trace: * line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
      * line 277 of /lib/dml/oci_native_moodle_database.php: call to moodle_database->query_end()
      * line 896 of /lib/dml/oci_native_moodle_database.php: call to oci_native_moodle_database->query_end()
      * line 77 of /lib/ddl/database_manager.php: call to oci_native_moodle_database->change_database_structure()
      * line 758 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
      * line 2263 of /lib/db/upgrade.php: call to database_manager->add_key()
      * line 1875 of /lib/upgradelib.php: call to xmldb_main_upgrade()
      * line 196 of /admin/cli/upgrade.php: call to upgrade_core()
       !!
      

      Attachments

        Issue Links

          Activity

            People

              huongn@moodle.com Huong Nguyen
              ilyatregubov Ilya Tregubov
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: