Permalink
Browse files

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
  • Loading branch information...
1 parent dbfc642 commit 2a0f40e98c2a3721f38d5e734d5c79a317e93287 martinlanghoff committed May 17, 2006
Showing with 3 additions and 0 deletions.
  1. +1 −0 mod/choice/db/postgres7.php
  2. +1 −0 mod/lesson/db/postgres7.php
  3. +1 −0 mod/scorm/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');
@@ -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');
@@ -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)');

0 comments on commit 2a0f40e

Please sign in to comment.