Changes to add login/logout button to the right-hand top corner of every page
[moodle.git] / version.php
blobda5e48afc4ac2a1ca9cb509c353f90dc13fe0fe3
1 <?PHP //$Id$
2 // This file keeps track of upgrades to Moodle.
3 //
4 // Sometimes, changes between versions involve
5 // alterations to database structures and other
6 // major things that may break installations.
7 //
8 // This file specifies the current version of
9 // Moodle installed, which can be compared against
10 // a previous version (see the "config" table).
12 // To do this, visit the "admin" page.
14 // The upgrade function in this file will attempt
15 // to perform all the necessary actions to upgrade
16 // your older databases to the current version.
17 // If there's something it cannot do itself, it
18 // will tell you what you need to do.
20 $version = 2002081503;
22 function upgrade_moodle($oldversion=0) {
24 if ($oldversion == 0) {
25 execute_sql("
26 CREATE TABLE `config` (
27 `id` int(10) unsigned NOT NULL auto_increment,
28 `name` varchar(255) NOT NULL default '',
29 `value` varchar(255) NOT NULL default '',
30 PRIMARY KEY (`id`),
31 UNIQUE KEY `name` (`name`)
32 ) COMMENT='Moodle configuration variables';");
33 notify("Created a new table 'config' to hold configuration data");
36 if ($oldversion < 2002073100) {
37 execute_sql("DELETE FROM `modules` WHERE `name` = 'chat' ");
40 if ($oldversion < 2002080200) {
41 execute_sql(" ALTER TABLE `modules` DROP `fullname` ");
42 execute_sql(" ALTER TABLE `modules` DROP `search` ");
45 if ($oldversion < 2002080300) {
46 execute_sql(" ALTER TABLE `log_display` CHANGE `table` `mtable` VARCHAR( 20 ) NOT NULL ");
47 execute_sql(" ALTER TABLE `user_teachers` CHANGE `authority` `authority` TINYINT( 3 ) DEFAULT '3' NOT NULL ");
50 return true;