Upgrade moodle 2.0 for 2.6

Upgrade moodle 2.0 for 2.6

by Adauto Mendes -
Number of replies: 2

Went to update the environment Moodle 2.0 to version 2.6 and found the problem was asking where the first upgrade to version 2.2 . So I made this update and when I update the database , I came across the following error below:

 

Debug info: Unknown column ' QuestionID ' in ' mdl_question_attempts '
ALTER TABLE ADD mdl_question_attempts variant BIGINT ( 10 ) unsigned NOT NULL DEFAULT 1 AFTER QuestionID
Stack trace :
line 400 of / lib / dml / moodle_database.php : ddl_change_structure_exception thrown
line 655 of / lib / dml / mysqli_native_moodle_database.php : call to moodle_database - > query_end egg
line 88 of / lib / ddl / database_manager.php : call to mysqli_native_moodle_database - > change_database_structure egg
line 75 of / lib / ddl / database_manager.php : call to database_manager - > execute_sql egg
line 586 of / lib / ddl / database_manager.php : call to database_manager - > execute_sql_arr egg
line 6492 of / lib / db / upgrade.php : call to database_manager - > add_field egg
line 1423 of / lib / upgradelib.php : call to xmldb_main_upgrade egg
line 277 of / admin / index.php : call to upgrade_core egg

 

I wonder if anyone can help me with this problem ?

Average of ratings: -
In reply to Adauto Mendes

Re: Upgrade moodle 2.0 for 2.6

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That step (adding the variant colum to question_attempts) happens quite late in the upgrade process, and by that state, the question_attempts definitely contains a column called 'questionid'. So, I don't understand why you are getting that error. (I also don't understand why the error message would say 'QuestionID' when the code calls it 'questionid'.

In reply to Tim Hunt

Re: Upgrade moodle 2.0 for 2.6

by Adauto Mendes -

With the update of the database, it looks for this "QuestionID" column, this column does not exist.