Failure to upgrade to Moodle 2.2 from 1.9

Failure to upgrade to Moodle 2.2 from 1.9

by Dan Johns -
Number of replies: 5

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: -
In reply to Dan Johns

Re: Failure to upgrade to Moodle 2.2 from 1.9

by john owen-jones -

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

 

In reply to john owen-jones

Re: Failure to upgrade to Moodle 2.2 from 1.9

by Dan Johns -

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()
 !!

 

In reply to Dan Johns

Re: Failure to upgrade to Moodle 2.2 from 1.9

by Guillermo Eduardo Torres -
The same to me is happening!
Any help?

Cheers!
In reply to Guillermo Eduardo Torres

Re: Failure to upgrade to Moodle 2.2 from 1.9

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Had a previous attempt failed? i.e. are you re-trying on a 'half' upgraded site?

Note: There is no such thing as a 'half upgrade'. You have to restore your backup, start again after removing whatever was causing trouble.
In reply to Visvanath Ratnaweera

Re: Failure to upgrade to Moodle 2.2 from 1.9

by Guillermo Eduardo Torres -

Hi Visvanath,

I'm doing each try from a full-backup restored.

Now, a DLL problem is reported from the upgrade process, it can't rename a table.


Apache/2.2.15

MySQL/5.1.69

Linux/GNU Centos 6.4