1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * phpGroupWare - Setup * |
---|
4 | * http://www.phpgroupware.org * |
---|
5 | * -------------------------------------------- * |
---|
6 | * This program is free software; you can redistribute it and/or modify it * |
---|
7 | * under the terms of the GNU General Public License as published by the * |
---|
8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
9 | * option) any later version. * |
---|
10 | \**************************************************************************/ |
---|
11 | |
---|
12 | // Since Expresso 1.2 using API EgroupWare 1.0.0.007 |
---|
13 | $test[] = '1.0.0.007'; |
---|
14 | function phpgwapi_upgrade1_0_0_007() |
---|
15 | { |
---|
16 | |
---|
17 | global $setup_info,$phpgw_setup; |
---|
18 | |
---|
19 | $phpgw_setup->oProc->AddColumn('phpgw_access_log','browser', array ('type' => 'varchar', 'precision' => 200)); |
---|
20 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0.008'; |
---|
21 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
22 | } |
---|
23 | |
---|
24 | $test[] = '1.0.0.008'; |
---|
25 | function phpgwapi_upgrade1_0_0_008() |
---|
26 | { |
---|
27 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.0.pre-alpha'; |
---|
28 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
29 | } |
---|
30 | |
---|
31 | $test[] = '2.0.0.pre-alpha'; |
---|
32 | function phpgwapi_upgrade2_0_0_prealpha() |
---|
33 | { |
---|
34 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.000'; |
---|
35 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
36 | } |
---|
37 | $test[] = '2.0.000'; |
---|
38 | function phpgwapi_upgrade2_0_000() |
---|
39 | { |
---|
40 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.001'; |
---|
41 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
42 | } |
---|
43 | $test[] = '2.0.001'; |
---|
44 | function phpgwapi_upgrade2_0_001() |
---|
45 | { |
---|
46 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.002'; |
---|
47 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
48 | } |
---|
49 | $test[] = '2.0.002'; |
---|
50 | function phpgwapi_upgrade2_0_002() |
---|
51 | { |
---|
52 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.003'; |
---|
53 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
54 | } |
---|
55 | $test[] = '2.0.003'; |
---|
56 | function phpgwapi_upgrade2_0_003() |
---|
57 | { |
---|
58 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.004'; |
---|
59 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
60 | } |
---|
61 | $test[] = '2.0.004'; |
---|
62 | function phpgwapi_upgrade2_0_004() |
---|
63 | { |
---|
64 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.005'; |
---|
65 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
66 | } |
---|
67 | $test[] = '2.0.005'; |
---|
68 | function phpgwapi_upgrade2_0_005() |
---|
69 | { |
---|
70 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.006'; |
---|
71 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
72 | } |
---|
73 | $test[] = '2.0.006'; |
---|
74 | function phpgwapi_upgrade2_0_006() |
---|
75 | { |
---|
76 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.007'; |
---|
77 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
78 | } |
---|
79 | $test[] = '2.0.007'; |
---|
80 | function phpgwapi_upgrade2_0_007() |
---|
81 | { |
---|
82 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.008'; |
---|
83 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
84 | } |
---|
85 | $test[] = '2.0.008'; |
---|
86 | function phpgwapi_upgrade2_0_008() |
---|
87 | { |
---|
88 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.009'; |
---|
89 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
90 | } |
---|
91 | $test[] = '2.0.009'; |
---|
92 | function phpgwapi_upgrade2_0_009() |
---|
93 | { |
---|
94 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.0.010'; |
---|
95 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
96 | } |
---|
97 | $test[] = '2.0.010'; |
---|
98 | function phpgwapi_upgrade2_0_010() |
---|
99 | { |
---|
100 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.1.000'; |
---|
101 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
102 | } |
---|
103 | $test[] = '2.1.000'; |
---|
104 | function phpgwapi_upgrade2_1_000() |
---|
105 | { |
---|
106 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.000'; |
---|
107 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
108 | } |
---|
109 | $test[] = '2.2.000'; |
---|
110 | function phpgwapi_upgrade2_2_000() |
---|
111 | { |
---|
112 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.1'; |
---|
113 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
114 | } |
---|
115 | $test[] = '2.2.1'; |
---|
116 | function phpgwapi_upgrade2_2_1() |
---|
117 | { |
---|
118 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.2'; |
---|
119 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
120 | } |
---|
121 | $test[] = '2.2.2'; |
---|
122 | function phpgwapi_upgrade2_2_2() |
---|
123 | { |
---|
124 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.3'; |
---|
125 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
126 | } |
---|
127 | $test[] = '2.2.3'; |
---|
128 | function phpgwapi_upgrade2_2_3() |
---|
129 | { |
---|
130 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.4'; |
---|
131 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
132 | } |
---|
133 | $test[] = '2.2.4'; |
---|
134 | function phpgwapi_upgrade2_2_4() |
---|
135 | { |
---|
136 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.6'; |
---|
137 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
138 | } |
---|
139 | $test[] = '2.2.6'; |
---|
140 | function phpgwapi_upgrade2_2_6() |
---|
141 | { |
---|
142 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.8'; |
---|
143 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
144 | } |
---|
145 | $test[] = '2.2.8'; |
---|
146 | function phpgwapi_upgrade2_2_8() |
---|
147 | { |
---|
148 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.10'; |
---|
149 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
150 | } |
---|
151 | $test[] = '2.2.10'; |
---|
152 | function phpgwapi_upgrade2_2_10() |
---|
153 | { |
---|
154 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.3.0'; |
---|
155 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
156 | } |
---|
157 | $test[] = '2.3.0'; |
---|
158 | function phpgwapi_upgrade2_3_0() |
---|
159 | { |
---|
160 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.4.0'; |
---|
161 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
162 | } |
---|
163 | $test[] = '2.4.0'; |
---|
164 | function phpgwapi_upgrade2_4_0() |
---|
165 | { |
---|
166 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.4.1'; |
---|
167 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
168 | } |
---|
169 | |
---|
170 | $test[] = '2.4.1'; |
---|
171 | function phpgwapi_upgrade2_4_1() |
---|
172 | { |
---|
173 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.4.2'; |
---|
174 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
175 | } |
---|
176 | $test[] = '2.4.2'; |
---|
177 | function phpgwapi_upgrade2_4_2() |
---|
178 | { |
---|
179 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.0'; |
---|
180 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
181 | } |
---|
182 | |
---|
183 | $test[] = '2.5.0'; |
---|
184 | function phpgwapi_upgrade2_5_0() |
---|
185 | { |
---|
186 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.1'; |
---|
187 | global $setup_info,$phpgw_setup; |
---|
188 | $phpgw_setup->oProc->query("ALTER TABLE phpgw_access_log ALTER COLUMN ip TYPE character varying(255) "); |
---|
189 | |
---|
190 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
191 | } |
---|
192 | |
---|
193 | $test[] = '2.5.1'; |
---|
194 | function phpgwapi_upgrade2_5_1() |
---|
195 | { |
---|
196 | global $phpgw_setup; |
---|
197 | |
---|
198 | $phpgw_setup->oProc->query( 'select * from information_schema.tables where table_name= \'phpgw_vfs\''); |
---|
199 | if( !$phpgw_setup->oProc->next_record() ) |
---|
200 | { |
---|
201 | $phpgw_setup->oProc->CreateTable('phpgw_vfs', array( |
---|
202 | 'fd' => array( |
---|
203 | 'file_id' => array('type' => 'auto','nullable' => False), |
---|
204 | 'owner_id' => array('type' => 'int','precision' => '4','nullable' => False), |
---|
205 | 'createdby_id' => array('type' => 'int','precision' => '4'), |
---|
206 | 'modifiedby_id' => array('type' => 'int','precision' => '4'), |
---|
207 | 'created' => array('type' => 'timestamp','nullable' => False,'default' => '1970-01-01'), |
---|
208 | 'modified' => array('type' => 'timestamp'), |
---|
209 | 'size' => array('type' => 'int','precision' => '4'), |
---|
210 | 'mime_type' => array('type' => 'varchar','precision' => '64'), |
---|
211 | 'deleteable' => array('type' => 'char','precision' => '1','default' => 'Y'), |
---|
212 | 'comment' => array('type' => 'varchar','precision' => '255'), |
---|
213 | 'app' => array('type' => 'varchar','precision' => '25'), |
---|
214 | 'directory' => array('type' => 'varchar','precision' => '255'), |
---|
215 | 'name' => array('type' => 'varchar','precision' => '128','nullable' => False), |
---|
216 | 'link_directory' => array('type' => 'varchar','precision' => '255'), |
---|
217 | 'link_name' => array('type' => 'varchar','precision' => '128'), |
---|
218 | 'version' => array('type' => 'varchar','precision' => '30','nullable' => False,'default' => '0.0.0.0'), |
---|
219 | 'content' => array('type' => 'longtext') |
---|
220 | ) |
---|
221 | )); |
---|
222 | } |
---|
223 | |
---|
224 | $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.5.1.0'; |
---|
225 | return $GLOBALS['setup_info']['phpgwapi']['currentver']; |
---|
226 | } |
---|
227 | ?> |
---|