Hello all,
I have run into an error when completing the final step when trying to upgrade the Moodle database.
I am upgrading from 3.7 to Moodle 3.9 (Build: 20200615)
I first ran all the server checks good all green ticks.
Other checks found the: mysql_full_unicode_support - check only so i don't think this is a problem.
See error below:
mod_h5pactivity
DDL sql execution error
Debug info: Table 'mdl_h5pactivity' already exists
CREATE TABLE mdl_h5pactivity (
id BIGINT(10) NOT NULL auto_increment,
course BIGINT(10) NOT NULL,
name VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
timecreated BIGINT(10) NOT NULL,
timemodified BIGINT(10) NOT NULL,
intro LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
introformat SMALLINT(4) NOT NULL DEFAULT 0,
grade BIGINT(10) DEFAULT 0,
displayoptions SMALLINT(4) NOT NULL DEFAULT 0,
enabletracking TINYINT(1) NOT NULL DEFAULT 1,
grademethod SMALLINT(4) NOT NULL DEFAULT 1,
reviewmode SMALLINT(4) DEFAULT 1,
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_h5pa_cou2_ix (course)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_general_ci
COMMENT='Stores the h5pactivity activity module instances.'
;
CREATE TABLE mdl_h5pactivity_attempts (
id BIGINT(10) NOT NULL auto_increment,
h5pactivityid BIGINT(10) NOT NULL,
userid BIGINT(20) NOT NULL,
timecreated BIGINT(10) NOT NULL,
timemodified BIGINT(10) NOT NULL,
attempt MEDIUMINT(6) NOT NULL DEFAULT 1,
rawscore BIGINT(10) DEFAULT 0,
maxscore BIGINT(10) DEFAULT 0,
scaled NUMERIC(10,5) NOT NULL DEFAULT 0,
duration BIGINT(10) DEFAULT 0,
completion TINYINT(1),
success TINYINT(1),
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_h5paatte_tim2_ix (timecreated)
, KEY mdl_h5paatte_h5ptim2_ix (h5pactivityid, timecreated)
, KEY mdl_h5paatte_h5puse2_ix (h5pactivityid, userid)
, KEY mdl_h5paatte_h5p2_ix (h5pactivityid)
, UNIQUE KEY mdl_h5paatte_h5puseatt2_uix (h5pactivityid, userid, attempt)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_general_ci
COMMENT='Users attempts inside H5P activities'
;
CREATE TABLE mdl_h5pactivity_attempts_results (
id BIGINT(10) NOT NULL auto_increment,
attemptid BIGINT(10) NOT NULL,
subcontent VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci,
timecreated BIGINT(10) NOT NULL,
interactiontype VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci,
description LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
correctpattern LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
response LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
additionals LONGTEXT CHARACTER SET utf8 COLLATE utf8_general_ci,
rawscore BIGINT(10) NOT NULL DEFAULT 0,
maxscore BIGINT(10) NOT NULL DEFAULT 0,
duration BIGINT(10) DEFAULT 0,
completion TINYINT(1),
success TINYINT(1),
CONSTRAINT PRIMARY KEY (id)
, KEY mdl_h5paatteresu_atttim2_ix (attemptid, timecreated)
, KEY mdl_h5paatteresu_att2_ix (attemptid)
)
ENGINE = InnoDB
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE = utf8_general_ci
COMMENT='H5Pactivities_attempts tracking info'
Error code: ddlexecuteerror
Stack trace:
- line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
- line 1098 of /lib/dml/mysqli_native_moodle_database.php: call to 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 830 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
- line 565 of /lib/upgradelib.php: call to upgrade_plugins_modules()
- line 1917 of /lib/upgradelib.php: call to upgrade_plugins()
- line 711 of /admin/index.php: call to upgrade_noncore()
Cheers,
Ben