DDL execute error when upgrading from 2.1.7 to 2.2.4

DDL execute error when upgrading from 2.1.7 to 2.2.4

by Luis Vázquez de Lara -
Number of replies: 4

Hi,
I posted on july 11th the following message:
"When tryin to ugrade Moodle from 2.1.7 to 2.2.4, the following error appears:
Debug info: Table 'mdl_lti' already exists
CREATE TABLE mdl_lti (
id BIGINT(10) unsigned NOT NULL auto_increment,
course BIGINT(10) unsigned NOT NULL DEFAULT 0,
name VARCHAR(255) NOT NULL DEFAULT '',
intro TEXT,
introformat SMALLINT(4) unsigned DEFAULT 0,
timecreated BIGINT(10) unsigned NOT NULL DEFAULT 0,
timemodified BIGINT(10) unsigned NOT NULL DEFAULT 0,
typeid BIGINT(10) unsigned,
toolurl TEXT NOT NULL,
securetoolurl TEXT,
instructorchoicesendname TINYINT(1) unsigned,
instructorchoicesendemailaddr TINYINT(1) unsigned,
instructorchoiceallowroster TINYINT(1) unsigned,
instructorchoiceallowsetting TINYINT(1) unsigned,
instructorcustomparameters VARCHAR(255),
instructorchoiceacceptgrades TINYINT(1) unsigned,
grade NUMERIC(10,5) NOT NULL DEFAULT 100,
launchcontainer TINYINT(2) unsigned NOT NULL DEFAULT 1,
resourcekey VARCHAR(255),
password VARCHAR(255),
debuglaunch TINYINT(1) unsigned NOT NULL DEFAULT 0,
showtitlelaunch TINYINT(1) unsigned NOT NULL DEFAULT 0,
showdescriptionlaunch TINYINT(1) unsigned NOT NULL DEFAULT 0,
servicesalt VARCHAR(40),
icon TEXT,
secureicon TEXT,
CONSTRAINT PRIMARY KEY (id)
) ENGINE = InnoDB
Stack trace:

    line 400 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
    line 669 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
    line 88 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
    line 75 of /lib/ddl/database_manager.php: call to database_manager->execute_sql()
    line 456 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
    line 408 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure()
    line 507 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
    line 271 of /lib/upgradelib.php: call to upgrade_plugins_modules()
    line 1437 of /lib/upgradelib.php: call to upgrade_plugins()
    line 269 of /admin/index.php: call to upgrade_noncore()

 I noticed a similar error in the forum, but there was no answer.
Please help"

Unofrtunately, I didn't receive any response, and I really need some advice. I've been upgrading my site since Moodle 1.9, and I don't know if this is creating the problem

Thanks again
Luis

Average of ratings: -
In reply to Luis Vázquez de Lara

Re: DDL execute error when upgrading from 2.1.7 to 2.2.4

by Guillermo Madero -

Hi Luis,

I'm not familiar with how the upgrade works, but the problem is caused because for some reason the script is trying to create an already existing table: mdl_lti.

If you have access to your database (e.g. via phpMyAdmin, a MySQL manager), you could try and rename that table:

  • Select your database.
  • Select table mdl_lti.
  • Select the "Operations" tab.
  • In the "Rename table to" box set a new name, for example mdl_lti_bk, and click on the Go button.

As most probably this table is empty, I think this should not cause any problems.

In reply to Guillermo Madero

Re: DDL execute error when upgrading from 2.1.7 to 2.2.4

by Luis Vázquez de Lara -

Hi Guillermo,

Thank you so much for your response. Finally I could upgrade my site.

Best regards y muchas gracias desde México

Luis

In reply to Guillermo Madero

Re: DDL execute error when upgrading from 2.1.7 to 2.2.4

by Theron Muller -

I wanted to note that I was having the same upgrade problem and this helped me to fix it. There were a number of database tables that had to be renamed, but the upgrade completed successfully in the end. Thanks!