2002-07-27 13:09:08 +00:00
|
|
|
<?PHP //$Id$
|
|
|
|
// This file keeps track of upgrades to Moodle.
|
|
|
|
//
|
|
|
|
// Sometimes, changes between versions involve
|
|
|
|
// alterations to database structures and other
|
|
|
|
// major things that may break installations.
|
|
|
|
//
|
|
|
|
// This file specifies the current version of
|
|
|
|
// Moodle installed, which can be compared against
|
|
|
|
// a previous version (see the "config" table).
|
|
|
|
//
|
|
|
|
// To do this, visit the "admin" page.
|
|
|
|
//
|
|
|
|
// The upgrade function in this file will attempt
|
|
|
|
// to perform all the necessary actions to upgrade
|
|
|
|
// your older databases to the current version.
|
|
|
|
// If there's something it cannot do itself, it
|
|
|
|
// will tell you what you need to do.
|
|
|
|
|
2002-07-31 14:19:35 +00:00
|
|
|
$version = 2002073100;
|
2002-07-27 13:09:08 +00:00
|
|
|
|
2002-07-29 15:09:16 +00:00
|
|
|
function upgrade_moodle($oldversion=0) {
|
2002-07-27 13:09:08 +00:00
|
|
|
|
2002-07-29 15:09:16 +00:00
|
|
|
if ($oldversion == 0) {
|
|
|
|
execute_sql("
|
|
|
|
CREATE TABLE `config` (
|
|
|
|
`id` int(10) unsigned NOT NULL auto_increment,
|
|
|
|
`name` varchar(255) NOT NULL default '',
|
|
|
|
`value` varchar(255) NOT NULL default '',
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
UNIQUE KEY `name` (`name`)
|
2002-07-31 14:19:35 +00:00
|
|
|
) COMMENT='Moodle configuration variables';");
|
2002-07-29 15:09:16 +00:00
|
|
|
notify("Created a new table 'config' to hold configuration data");
|
|
|
|
}
|
|
|
|
|
2002-07-31 14:19:35 +00:00
|
|
|
if ($oldversion < 2002073100) {
|
|
|
|
execute_sql("DELETE FROM `modules` WHERE `name` = 'chat' ");
|
2002-07-29 15:09:16 +00:00
|
|
|
}
|
2002-07-31 14:19:35 +00:00
|
|
|
|
2002-07-27 13:09:08 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|