]> git.mjollnir.org Git - moodle.git/commitdiff
moodle16cleanup: mod/scorm version column should not be dropped, it must
authormartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:30:13 +0000 (06:30 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 17 May 2006 06:30:13 +0000 (06:30 +0000)
exist. it was not upgraded as with mysql.php 2005041600

mod/scorm/db/postgres7.php
mod/scorm/version.php

index 6aa2cfeb6834f0924bc2467b74ec4f7db723f307..41f9510ed681d7833299d58f57d77c8a213a89cd 100755 (executable)
@@ -187,6 +187,7 @@ function scorm_upgrade($oldversion) {
         modify_database('','ALTER TABLE ONLY prefix_scorm_scoes_track ADD UNIQUE (userid, scormid, scoid, element)');
         modify_database('','ALTER TABLE prefix_scorm ALTER browsemode SET DEFAULT 0');
         modify_database('','ALTER TABLE prefix_scorm DROP version');
+        notify('You can ignore the error above as version column does not exists, this will be properly upgraded later');
         table_column('scorm_scoes','datafromlms','datafromlms','VARCHAR','255','','');
         table_column('scorm_scoes','maxtimeallowed','maxtimeallowed','VARCHAR','19','','');
     }
@@ -225,6 +226,12 @@ function scorm_upgrade($oldversion) {
     if ($oldversion < 2005102800) {
         table_column("scorm", "", "maxattempt", "integer", "", "UNSIGNED", "1", "NOT NULL", "maxgrade"); 
     }
+
+
+    if ($oldversion < 2006021401) {
+       table_column("scorm", "", "version", "VARCHAR", "9", "", "", "NOT NULL", "reference");
+    }
+
     return true;
 }
 ?>
index 1fa6f1489a3c8924aace83e8d037b52f4c36539e..863842fd2f661779f3f53fc6f1dd335de46e3286 100755 (executable)
@@ -5,7 +5,7 @@
 ///  This fragment is called by moodle_needs_upgrading() and /admin/index.php
 /////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2006021400;   // The (date) version of this module
+$module->version  = 2006021401;   // The (date) version of this module
 $module->requires = 2005060200;   // The version of Moodle that is required
 $module->cron     = 0;            // How often should cron check this module (seconds)?