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

Fail to update to 4.5+ from 4.2.5: Table 'mdl_*' already exists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Minor Minor
    • None
    • 4.5
    • Usability
    • None
    • MySQL
    • MOODLE_405_STABLE

      unable to update to 4.5+ from 4.2.5 as multiple tables already exist which are being created.

      If a table needs to be recreated it should be deleted first.

       

      error message as follows
      DDL sql execution error

      More information about this error
      Debug info: Table 'mdl_communication_customlink' already exists
      CREATE TABLE mdl_communication_customlink (
      id BIGINT(10) NOT NULL auto_increment,
      commid BIGINT(10) NOT NULL,
      url VARCHAR(255) COLLATE utf8mb4_general_ci,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_commcust_com2_ix (commid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Stores the link associated with a custom link communication '
      Error code: ddlexecuteerror×Dismiss this notification
      Stack trace: * line 503 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown

      • line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
      • line 1189 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
      • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
      • line 427 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
      • line 372 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
      • line 729 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
      • line 1937 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 719 of /admin/index.php: call to upgrade_noncore()

      DDL sql execution error

      More information about this error
      Debug info: Table 'mdl_matrix_room' already exists
      CREATE TABLE mdl_matrix_room (
      id BIGINT(10) NOT NULL auto_increment,
      commid BIGINT(10) NOT NULL,
      roomid VARCHAR(255) COLLATE utf8mb4_general_ci,
      topic VARCHAR(255) COLLATE utf8mb4_general_ci,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_matrroom_com2_ix (commid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Stores the matrix room information associated with the commu'
      Error code: ddlexecuteerror×Dismiss this notification
      Stack trace: * line 503 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown

      • line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
      • line 1189 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
      • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
      • line 427 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
      • line 372 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
      • line 729 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
      • line 1937 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 719 of /admin/index.php: call to upgrade_noncore()

      DDL sql execution error

      More information about this error
      Debug info: Table 'mdl_tool_mfa' already exists
      CREATE TABLE mdl_tool_mfa (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      factor VARCHAR(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      secret VARCHAR(1333) COLLATE utf8mb4_general_ci,
      label VARCHAR(1333) COLLATE utf8mb4_general_ci,
      timecreated BIGINT(15),
      createdfromip VARCHAR(100) COLLATE utf8mb4_general_ci,
      timemodified BIGINT(15),
      lastverified BIGINT(15),
      revoked TINYINT(1) NOT NULL DEFAULT 0,
      lockcounter MEDIUMINT(5) NOT NULL DEFAULT 0,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfa_use2_ix (userid)
      , KEY mdl_toolmfa_fac2_ix (factor)
      , KEY mdl_toolmfa_usefacloc2_ix (userid, factor, lockcounter)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Table to store factor configurations for users'
      ;
      CREATE TABLE mdl_tool_mfa_secrets (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      factor VARCHAR(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      secret VARCHAR(1333) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      timecreated BIGINT(15) NOT NULL,
      expiry BIGINT(15) NOT NULL,
      revoked TINYINT(1) NOT NULL DEFAULT 0,
      sessionid VARCHAR(100) COLLATE utf8mb4_general_ci,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfasecr_fac2_ix (factor)
      , KEY mdl_toolmfasecr_exp2_ix (expiry)
      , KEY mdl_toolmfasecr_use2_ix (userid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Table to store factor secrets'
      ;
      CREATE TABLE mdl_tool_mfa_auth (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      lastverified BIGINT(15) NOT NULL DEFAULT 0,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfaauth_use2_ix (userid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Stores the last time a successful MFA auth was registered fo'
      Error code: ddlexecuteerror
      DDL sql execution error

      More information about this error
      Debug info: Table 'mdl_tool_mfa_secrets' already exists
      CREATE TABLE mdl_tool_mfa (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      factor VARCHAR(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      secret VARCHAR(1333) COLLATE utf8mb4_general_ci,
      label VARCHAR(1333) COLLATE utf8mb4_general_ci,
      timecreated BIGINT(15),
      createdfromip VARCHAR(100) COLLATE utf8mb4_general_ci,
      timemodified BIGINT(15),
      lastverified BIGINT(15),
      revoked TINYINT(1) NOT NULL DEFAULT 0,
      lockcounter MEDIUMINT(5) NOT NULL DEFAULT 0,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfa_use_ix (userid)
      , KEY mdl_toolmfa_fac_ix (factor)
      , KEY mdl_toolmfa_usefacloc_ix (userid, factor, lockcounter)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Table to store factor configurations for users'
      ;
      CREATE TABLE mdl_tool_mfa_secrets (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      factor VARCHAR(100) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      secret VARCHAR(1333) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '',
      timecreated BIGINT(15) NOT NULL,
      expiry BIGINT(15) NOT NULL,
      revoked TINYINT(1) NOT NULL DEFAULT 0,
      sessionid VARCHAR(100) COLLATE utf8mb4_general_ci,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfasecr_fac2_ix (factor)
      , KEY mdl_toolmfasecr_exp2_ix (expiry)
      , KEY mdl_toolmfasecr_use2_ix (userid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Table to store factor secrets'
      ;
      CREATE TABLE mdl_tool_mfa_auth (
      id BIGINT(10) NOT NULL auto_increment,
      userid BIGINT(10) NOT NULL,
      lastverified BIGINT(15) NOT NULL DEFAULT 0,
      CONSTRAINT PRIMARY KEY (id)
      , KEY mdl_toolmfaauth_use2_ix (userid)
      )
      ENGINE = InnoDB
      DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed
      COMMENT='Stores the last time a successful MFA auth was registered fo'
      Error code: ddlexecuteerror×Dismiss this notification
      Stack trace: * line 503 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown

      • line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
      • line 1194 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
      • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
      • line 427 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
      • line 372 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
      • line 729 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
      • line 1937 of /lib/upgradelib.php: call to upgrade_plugins()
      • line 719 of /admin/index.php: call to upgrade_noncore()

            Unassigned Unassigned
            kale1d0code kale1d0code
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.