Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / mod / label / db / postgres7.php
blob91dceabba950b150773df1eb6cd396ad1329010e
1 <?php
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
12 /// older versions to match current functionality
16 global $CFG;
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.
44 return true;