From: martinlanghoff Date: Wed, 17 May 2006 06:42:57 +0000 (+0000) Subject: mod/choice mod/lesson mod/scorm moodle16cleanup: Added notification X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2a0f40e98c2a3721f38d5e734d5c79a317e93287;p=moodle.git mod/choice mod/lesson mod/scorm moodle16cleanup: Added notification for cleanup that may fail if one is starting fresh from moodle 1.5.3+, previous cleanup before 1.5.3 is not needed --- diff --git a/mod/choice/db/postgres7.php b/mod/choice/db/postgres7.php index 041b80e13a..7e71c2e53b 100644 --- a/mod/choice/db/postgres7.php +++ b/mod/choice/db/postgres7.php @@ -93,6 +93,7 @@ function choice_upgrade($oldversion) { 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'); diff --git a/mod/lesson/db/postgres7.php b/mod/lesson/db/postgres7.php index 4d6c92287f..fad2d9b161 100644 --- a/mod/lesson/db/postgres7.php +++ b/mod/lesson/db/postgres7.php @@ -253,6 +253,7 @@ function lesson_upgrade($oldversion) { 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'); diff --git a/mod/scorm/db/postgres7.php b/mod/scorm/db/postgres7.php index 41f9510ed6..72484abc17 100755 --- a/mod/scorm/db/postgres7.php +++ b/mod/scorm/db/postgres7.php @@ -181,6 +181,7 @@ function scorm_upgrade($oldversion) { 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)');