]> git.mjollnir.org Git - moodle.git/commitdiff
mod/choice mod/lesson mod/scorm moodle16cleanup: Added notification
authormartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:42:57 +0000 (06:42 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:42:57 +0000 (06:42 +0000)
for cleanup that may fail if one is starting fresh from moodle 1.5.3+,
previous cleanup before 1.5.3 is not needed

mod/choice/db/postgres7.php
mod/lesson/db/postgres7.php
mod/scorm/db/postgres7.php

index 041b80e13a504588b6ba743c8833acd81d569663..7e71c2e53bbf87dd9fe34e2bb537eec285d66a50 100644 (file)
@@ -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');
index 4d6c92287f01de266aa7c59c5ca77f5dd3b86e3d..fad2d9b161c8c31ed26164045176dda2e9e7aa8e 100644 (file)
@@ -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');
index 41f9510ed681d7833299d58f57d77c8a213a89cd..72484abc175ca84be71dd9e63ad0bfc3fc3d4f4f 100755 (executable)
@@ -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)');