2.2.6 upgrade failed....AGAIN

2.2.6 upgrade failed....AGAIN

by juice masters -
Number of replies: 2

I am extremely frustrated right now because I cannot seem to upgrade my site (2.2.6) to the new 2.6 version.  I am using build 20121112 and when I attempt to upgrade everything works fine until I get this error message;

quiz_grading

Error writing to database

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

Debug info: Duplicate entry 'grading' for key 'mdl_quizrepo_nam_uix'
INSERT INTO mdl_quiz_reports (name,displayorder,capability) VALUES(?,?,?)
[array (
0 => 'grading',
1 => '6000',
2 => 'mod/quiz:grade',
)]
Error code: dmlwriteexception

Stack trace:

  • line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1122 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 39 of /mod/quiz/report/grading/db/install.php: call to mysqli_native_moodle_database->insert_record()
  • line 486 of /lib/upgradelib.php: call to xmldb_quiz_grading_install()
  • line 1580 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 431 of /admin/index.php: call to upgrade_noncore()

I have tried everything that I can think of to no avail.  I thought that it would help to upgrade to the newest 2.2. version but when I try to upgrade to 2.2.11 I get another message that says;

Debug info: Table 'mdl_enrol_authorize' already exists
CREATE TABLE mdl_enrol_authorize (
id BIGINT(10) unsigned NOT NULL auto_increment,
paymentmethod VARCHAR(6) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'cc',
refundinfo SMALLINT(4) unsigned NOT NULL DEFAULT 0,
ccname VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
courseid BIGINT(10) unsigned NOT NULL DEFAULT 0,
instanceid BIGINT(10) unsigned NOT NULL DEFAULT 0,
userid BIGINT(10) unsigned NOT NULL DEFAULT 0,
transid BIGINT(20) unsigned NOT NULL DEFAULT 0,
status BIGINT(10) unsigned NOT NULL DEFAULT 0,
timecreated BIGINT(10) unsigned NOT NULL DEFAULT 0,
settletime BIGINT(10) unsigned NOT NULL DEFAULT 0,
amount VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
currency VARCHAR(3) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'USD',
CONSTRAINT PRIMARY KEY (id)
) ENGINE = InnoDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE = utf8_general_ci
Stack trace:
  • line 400 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
  • line 749 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 347 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 1437 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 269 of \admin\index.php: call to upgrade_noncore()

I can't image that I am the only one experiencing this problem so there has to be a solution.  PLEASE HELP!!!!

Average of ratings: -
In reply to juice masters

Re: 2.2.6 upgrade failed....AGAIN

by juice masters -

I cant believe that I am the only person to experience this error.  I am running version 2011120506.00 and I am trying to upgrade to version 2013111801.00.  PLEASE PLEASE HELP.  I really want to make this upgrade and if for some reason I am stuck at 2.2.6 I will have to start all over with another program because I cant even import my existing classes.  This is crazy, I must be missing something.  Any ideas?

In reply to juice masters

Re: 2.2.6 upgrade failed....AGAIN

by juice masters -

I tried to start all over and now I ran into another problem.  I backed up my database from my production server and imported it into a new database on my development server.  Then I copied over all of my production site files to the development server and tried to open the site on the development server just to have a good starting point.  For whatever reason it says;

"ERROR!!! The code you are using is OLDER than the version that made these databases!"

Seriously what am I doing wrong? I am assuming that these are exact files that the production site is using with no problems so why would I run into this error? I had no problem with the last two upgrades but this one is killing me.  Any advice would be GREATLY appreciated.  Thanks