On fresh installs of Moodle 1.9 the question attempts table is created with two columns, id and modulename, specified in mod/quiz/install.xml. Later on, the Moodle upgrade checks to see if the question_attempts table exists, if it does not, it adds it with other fields. Now coming from a 1.9 upgrade this is going to be ignored as the table exists. This will then cause an error later in the upgrade, the following error occurs. I have created a patch to fix this issue.
Debug info: Unknown column 'questionid' in 'mdl_question_attempts'
ALTER TABLE mdl_question_attempts ADD variant BIGINT(10) unsigned NOT NULL DEFAULT 1 AFTER questionid
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()
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 586 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
line 6492 of /lib/db/upgrade.php: call to database_manager->add_field()
line 1423 of /lib/upgradelib.php: call to xmldb_main_upgrade()
line 277 of /admin/index.php: call to upgrade_core()