Installation help

 
 
Picture of Dan Johns
Failure to upgrade to Moodle 2.2 from 1.9
 

Hello,

The upgrade I'm attempting is failing. I'm calling cli/upgrade.php from the command line, but the result is:

 

-->System
Default exception handler: Table "upgrade_log" already exists Debug:
* line 469 of /lib/ddl/database_manager.php: ddl_exception thrown
* line 93 of /lib/db/upgrade.php: call to database_manager->create_table()
* line 1394 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 150 of /admin/cli/upgrade.php: call to upgrade_core()

!!! Table "upgrade_log" already exists !!!
!! Stack trace: * line 469 of /lib/ddl/database_manager.php: ddl_exception thrown
* line 93 of /lib/db/upgrade.php: call to database_manager->create_table()
* line 1394 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 150 of /admin/cli/upgrade.php: call to upgrade_core()
 !!

I have seen similar topics on the forum, but unfortunately, the solution is to simply restore Moodle's DB from before the upgrade and try again. This is not an option for me, as this installation was attempted to be upgraded in the past, and has since had a number of posts pushed to it. So importing a database without "upgrade_log" is not an option.

 

Are there any other solutions to this problem?

 
Average of ratings: -
Picture of john owen-jones
Re: Failure to upgrade to Moodle 2.2 from 1.9
 

hi Dan

to get past that you can use phpmyadmin and drop that table, as its complaint is not being able to make that table since it exists. all it contains is the errors you listed.

Have you managed to get round the admin block and the admintree block when i try to upgrade i get told they are non standard and get an exception thrown which goes into the upgrade log file.

 

so far the only successful upgrade is from 1.9.10 to 1.9.19 I just can't reach 2.anything

regards

john

 

 
Average of ratings: -
Picture of Dan Johns
Re: Failure to upgrade to Moodle 2.2 from 1.9
 

I've dropped the table, but I'm presented with the same error for the table "log_queries." Then for "message_processors", "files", and "config_log".

 

After dropping all those tables, I'm presented with the following:

 

Default exception handler: Error writing to database Debug: Duplicate entry '1-1' for key 'mdl_rolealloswit_rolall_uix'
INSERT INTO mdl_role_allow_switch (roleid, allowswitch)
                SELECT roleid, allowassign FROM mdl_role_allow_assign
[array (
)]
* line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 802 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1292 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->execute()
* line 1394 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 150 of /admin/cli/upgrade.php: call to upgrade_core()

!!! Error writing to database !!!
!! Duplicate entry '1-1' for key 'mdl_rolealloswit_rolall_uix'
INSERT INTO mdl_role_allow_switch (roleid, allowswitch)
                SELECT roleid, allowassign FROM mdl_role_allow_assign
[array (
)] !!
!! Stack trace: * line 397 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 802 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
* line 1292 of /lib/db/upgrade.php: call to mysqli_native_moodle_database->execute()
* line 1394 of /lib/upgradelib.php: call to xmldb_main_upgrade()
* line 150 of /admin/cli/upgrade.php: call to upgrade_core()
 !!

 

 
Average of ratings: -