3 // THIS FILE IS DEPRECATED! PLEASE DO NOT MAKE CHANGES TO IT!
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
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', 'quiz', 'name');");
21 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', '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.