I am going to used NUMBER(10, 5), like in the gradebook, for the various quiz table columns that store aggregated grades. But in the question processing, which stores intermediate grades for individual questions that are latter added together, I am going to use more precision, probably NUMBER(12, 7).
The columns in the question bank that I think should be NUMBER(12, 7) are:
question.defaultgrade
question.penalty
question_answers.fraction
question_sessions.sumpenalty
question_states.grade
question_states.raw_grade
question_states.penalty
the columns in the quiz that I think should be NUMBER(10, 5) are
quiz.sumgrades
quiz.grade
quiz_attempts.sumgrades
quiz_feedback.
quiz_feedback.
quiz_grades.grade
quiz_question_instances.grade
quiz_question_statistics.maxgrade
Petr has just said in Moodle HQ chat, that I should break this down into lots of different upgrades, one per column, so that if something goes wrong half way, it is possible to resume at exactly the right point.
Too late to mess with the database in 1.8. Pushing to 1.9