mirrored from git://git.moodle.org/moodle.git
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
/
mysql.php
50 lines (40 loc) · 2.16 KB
/
mysql.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
function data_upgrade($oldversion) {
/// This function does anything necessary to upgrade
/// older versions to match current functionality
global $CFG;
if ($oldversion < 2006011900) {
table_column("data_content", "", "content1", "longtext", "", "", "", "not null");
table_column("data_content", "", "content2", "longtext", "", "", "", "not null");
table_column("data_content", "", "content3", "longtext", "", "", "", "not null");
table_column("data_content", "", "content4", "longtext", "", "", "", "not null");
}
if ($oldversion < 2006011901) {
table_column("data", "", "approval", "tinyint", "4");
table_column("data_records", "", "approved", "tinyint", "4");
}
if ($oldversion < 2006020801) {
table_column("data", "", "scale", "integer", "10", "signed");
table_column("data", "", "assessed", "integer", "10");
table_column("data", "", "assesspublic", "integer", "4");
}
if ($oldversion < 2006022700) {
table_column("data_comments", "", "created", "integer", "10");
table_column("data_comments", "", "modified", "integer", "10");
}
if ($oldversion < 2006030700) {
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'add', 'data', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'update', 'data', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'record delete', 'data', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields add', 'data_fields', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'fields update', 'data_fields', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates saved', 'data', 'name')");
modify_database('', "INSERT INTO prefix_log_display VALUES ('data', 'templates def', 'data', 'name')");
}
if ($oldversion < 2006032700) {
table_column("data", "", "defaultsort", "integer", "10", "signed");
table_column("data", "", "editany", "tinyint", "4");
}
return true;
}
?>