if ($oldversion < 2005041501) { // Mass cleanup of bad upgrade scripts
modify_database('','CREATE INDEX prefix_choice_answers_choice_idx ON prefix_choice_answers (choiceid)');
+ notify('The above error can be ignored if the index already exists, its possible that it was cleaned up already before running this upgrade');
modify_database('','ALTER TABLE prefix_choice ALTER display SET NOT NULL');
modify_database('','ALTER TABLE prefix_choice ALTER limitanswers SET NOT NULL');
modify_database('','ALTER TABLE prefix_choice_answers ALTER choiceid SET NOT NULL');
table_column('lesson','maxhighscores','maxhighscores','integer','16');
modify_database('','ALTER TABLE prefix_lesson ALTER displayleft SET NOT NULL');
table_column('lesson','','minquestions','integer','8');
+ notify('The above error can be ignored if the column already exists, its possible that it was cleaned up already before running this upgrade');
table_column('lesson','maxtime','maxtime','integer','16');
modify_database('','ALTER TABLE prefix_lesson ALTER ongoing SET NOT NULL');
modify_database('','ALTER TABLE prefix_lesson ALTER password SET NOT NULL');
modify_database('','CREATE INDEX prefix_scorm_scoes_track_scorm_idx ON prefix_scorm_scoes_track (scormid);');
modify_database('','CREATE INDEX prefix_scorm_scoes_track_user_idx ON prefix_scorm_scoes_track (userid);');
modify_database('','CREATE INDEX prefix_scorm_scoes_track_sco_idx ON prefix_scorm_scoes_track (scoid);');
+ notify('The above errors can be ignored if the indexes already exists, its possible that it was cleaned up already before running this upgrade');
execute_sql("DROP INDEX {$CFG->prefix}scorm_scoes_track_track_idx", false);
modify_database('','ALTER TABLE ONLY prefix_scorm_scoes_track DROP CONSTRAINT prefix_scorm_scoes_track_pkey');
modify_database('','ALTER TABLE ONLY prefix_scorm_scoes_track ADD CONSTRAINT prefix_scorm_scoes_track_pkey PRIMARY KEY (id)');