Skip to content

Commit

Permalink
moodle16cleanup: mod/scorm version column should not be dropped, it must
Browse files Browse the repository at this point in the history
exist. it was not upgraded as with mysql.php 2005041600
  • Loading branch information
martinlanghoff committed May 17, 2006
1 parent 35c30e9 commit 1ce5928
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions mod/scorm/db/postgres7.php
Expand Up @@ -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','','');
}
Expand Down Expand Up @@ -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;
}
?>
2 changes: 1 addition & 1 deletion mod/scorm/version.php
Expand Up @@ -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)?
Expand Down

0 comments on commit 1ce5928

Please sign in to comment.