Merge commit 'catalyst/MOODLE_19_STABLE' into mdl19-linuxchix
[moodle-linuxchix.git] / mod / label / db / mysql.php
blob464d652102883390a2ad13ffce58103a60158e75
1 <?php // $Id$
3 // THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
4 //
5 // IT IS USED ONLY FOR UPGRADES FROM BEFORE MOODLE 1.7, ALL
6 // LATER CHANGES SHOULD USE upgrade.php IN THIS DIRECTORY.
8 function label_upgrade($oldversion) {
10 /// This function does anything necessary to upgrade
11 /// older versions to match current functionality
13 global $CFG;
15 if ($oldversion < 2003091400) {
16 table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
19 if ($oldversion < 2004021900) {
20 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'label', 'name');");
21 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'label', 'name');");
24 if ($oldversion < 2004111200) { //DROP first
25 execute_sql("ALTER TABLE {$CFG->prefix}label DROP INDEX course;",false);
26 modify_database('','ALTER TABLE prefix_label ADD INDEX course (course);');
29 ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.
31 return true;