Database needs prefix

This commit is contained in:
moodler 2003-09-19 11:58:24 +00:00
parent 489b291962
commit 35b8e7c28d
2 changed files with 4 additions and 5 deletions

View File

@ -6,10 +6,9 @@ function attendance_upgrade($oldversion) {
global $CFG;
if ($oldversion < 2003091801) {
execute_sql("ALTER TABLE `attendance` ADD `edited` TINYINT( 1 ) DEFAULT '0' NOT NULL;");
execute_sql("UPDATE `attendance` set `edited` = 1;");
if ($oldversion < 2003091802) {
execute_sql("ALTER TABLE `{$CFG->prefix}attendance` ADD `edited` TINYINT( 1 ) DEFAULT '0' NOT NULL;");
execute_sql("UPDATE `{$CFG->prefix}attendance` set `edited` = 1;");
}
return true;

View File

@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
$module->version = 2003091801; // The current module version (Date: YYYYMMDDXX)
$module->version = 2003091802; // The current module version (Date: YYYYMMDDXX)
$module->cron = 0; // Period for cron to check this module (secs)
?>