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
12 /// older versions to match current functionality
20 if ($oldversion < 2003091400) {
22 table_column("label", "", "course", "integer", "10", "unsigned", "0", "not null", "id");
28 if ($oldversion < 2004021900) {
30 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'add', 'quiz', 'name');");
32 modify_database("", "INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('label', 'update', 'quiz', 'name');");
36 if ($oldversion < 2004111200) { //DROP first
37 execute_sql("DROP INDEX {$CFG->prefix}label_course_idx;",false);
39 modify_database('','CREATE INDEX prefix_label_course_idx ON prefix_label (course);');
42 ////// DO NOT ADD NEW THINGS HERE!! USE upgrade.php and the lib/ddllib.php functions.