1 | <?php |
---|
2 | /**************************************************************************\ |
---|
3 | * ExpressoLivre - Setup * |
---|
4 | * http://www.expressolivre.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 | // Since Expresso 1.2 using ExpressoMail 1.233 |
---|
12 | $test[] = '1.233'; |
---|
13 | function expressoMail1_2_upgrade1_233() { |
---|
14 | $setup_info['expressoMail1_2']['currentver'] = '1.234'; |
---|
15 | return $setup_info['expressoMail1_2']['currentver']; |
---|
16 | } |
---|
17 | $test[] = '1.234'; |
---|
18 | function expressoMail1_2_upgrade1_234() { |
---|
19 | $oProc = $GLOBALS['phpgw_setup']->oProc; |
---|
20 | $oProc->CreateTable('phpgw_certificados',array( |
---|
21 | 'fd' => array( |
---|
22 | 'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false), |
---|
23 | 'chave_publica' => array( 'type' => 'text'), |
---|
24 | 'expirado' => array('type' => 'bool', 'default' => 'false'), |
---|
25 | 'revogado' => array('type' => 'bool', 'default' => 'false'), |
---|
26 | 'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false), |
---|
27 | 'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false), |
---|
28 | ), |
---|
29 | 'pk' => array('email','serialnumber','authoritykeyidentifier'), |
---|
30 | 'fk' => array(), |
---|
31 | 'ix' => array(), |
---|
32 | 'uc' => array() |
---|
33 | ) |
---|
34 | ); |
---|
35 | $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235'; |
---|
36 | return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; |
---|
37 | } |
---|
38 | $test[] = '1.235'; |
---|
39 | function expressoMail1_2_upgrade1_235() { |
---|
40 | $setup_info['expressoMail1_2']['currentver'] = '2.0.000'; |
---|
41 | return $setup_info['expressoMail1_2']['currentver']; |
---|
42 | } |
---|
43 | $test[] = '2.0.000'; |
---|
44 | function expressoMail1_2_upgrade2_0_000() { |
---|
45 | $setup_info['expressoMail1_2']['currentver'] = '2.0.001'; |
---|
46 | return $setup_info['expressoMail1_2']['currentver']; |
---|
47 | } |
---|
48 | $test[] = '2.0.001'; |
---|
49 | function expressoMail1_2_upgrade2_0_001() { |
---|
50 | $setup_info['expressoMail1_2']['currentver'] = '2.0.002'; |
---|
51 | return $setup_info['expressoMail1_2']['currentver']; |
---|
52 | } |
---|
53 | $test[] = '2.0.002'; |
---|
54 | function expressoMail1_2_upgrade2_0_002() { |
---|
55 | $setup_info['expressoMail1_2']['currentver'] = '2.0.003'; |
---|
56 | return $setup_info['expressoMail1_2']['currentver']; |
---|
57 | } |
---|
58 | $test[] = '2.0.003'; |
---|
59 | function expressoMail1_2_upgrade2_0_003() { |
---|
60 | $setup_info['expressoMail1_2']['currentver'] = '2.0.004'; |
---|
61 | return $setup_info['expressoMail1_2']['currentver']; |
---|
62 | } |
---|
63 | $test[] = '2.0.004'; |
---|
64 | function expressoMail1_2_upgrade2_0_004() { |
---|
65 | $setup_info['expressoMail1_2']['currentver'] = '2.0.005'; |
---|
66 | return $setup_info['expressoMail1_2']['currentver']; |
---|
67 | } |
---|
68 | $test[] = '2.0.005'; |
---|
69 | function expressoMail1_2_upgrade2_0_005() { |
---|
70 | $setup_info['expressoMail1_2']['currentver'] = '2.0.006'; |
---|
71 | return $setup_info['expressoMail1_2']['currentver']; |
---|
72 | } |
---|
73 | $test[] = '2.0.006'; |
---|
74 | function expressoMail1_2_upgrade2_0_006() { |
---|
75 | $setup_info['expressoMail1_2']['currentver'] = '2.0.007'; |
---|
76 | return $setup_info['expressoMail1_2']['currentver']; |
---|
77 | } |
---|
78 | $test[] = '2.0.007'; |
---|
79 | function expressoMail1_2_upgrade2_0_007() { |
---|
80 | $setup_info['expressoMail1_2']['currentver'] = '2.0.008'; |
---|
81 | return $setup_info['expressoMail1_2']['currentver']; |
---|
82 | } |
---|
83 | $test[] = '2.0.008'; |
---|
84 | function expressoMail1_2_upgrade2_0_008() { |
---|
85 | $setup_info['expressoMail1_2']['currentver'] = '2.0.009'; |
---|
86 | return $setup_info['expressoMail1_2']['currentver']; |
---|
87 | } |
---|
88 | $test[] = '2.0.009'; |
---|
89 | function expressoMail1_2_upgrade2_0_009() { |
---|
90 | $setup_info['expressoMail1_2']['currentver'] = '2.0.010'; |
---|
91 | return $setup_info['expressoMail1_2']['currentver']; |
---|
92 | } |
---|
93 | $test[] = '2.0.010'; |
---|
94 | function expressoMail1_2_upgrade2_0_010() { |
---|
95 | $setup_info['expressoMail1_2']['currentver'] = '2.1.000'; |
---|
96 | return $setup_info['expressoMail1_2']['currentver']; |
---|
97 | } |
---|
98 | $test[] = '2.1.000'; |
---|
99 | function expressoMail1_2_upgrade2_1_000() { |
---|
100 | $setup_info['expressoMail1_2']['currentver'] = '2.2.000'; |
---|
101 | return $setup_info['expressoMail1_2']['currentver']; |
---|
102 | } |
---|
103 | $test[] = '2.2.000'; |
---|
104 | function expressoMail1_2_upgrade2_2_000() { |
---|
105 | $setup_info['expressoMail1_2']['currentver'] = '2.2.1'; |
---|
106 | return $setup_info['expressoMail1_2']['currentver']; |
---|
107 | } |
---|
108 | $test[] = '2.2.1'; |
---|
109 | function expressoMail1_2_upgrade2_2_1() { |
---|
110 | $setup_info['expressoMail1_2']['currentver'] = '2.2.2'; |
---|
111 | return $setup_info['expressoMail1_2']['currentver']; |
---|
112 | } |
---|
113 | $test[] = '2.2.2'; |
---|
114 | function expressoMail1_2_upgrade2_2_2() { |
---|
115 | $setup_info['expressoMail1_2']['currentver'] = '2.2.4'; |
---|
116 | return $setup_info['expressoMail1_2']['currentver']; |
---|
117 | } |
---|
118 | $test[] = '2.2.4'; |
---|
119 | function expressoMail1_2_upgrade2_2_4() { |
---|
120 | $setup_info['expressoMail1_2']['currentver'] = '2.2.6'; |
---|
121 | return $setup_info['expressoMail1_2']['currentver']; |
---|
122 | } |
---|
123 | $test[] = '2.2.6'; |
---|
124 | function expressoMail1_2_upgrade2_2_6() { |
---|
125 | $setup_info['expressoMail1_2']['currentver'] = '2.2.8'; |
---|
126 | return $setup_info['expressoMail1_2']['currentver']; |
---|
127 | } |
---|
128 | $test[] = '2.2.8'; |
---|
129 | function expressoMail1_2_upgrade2_2_8() { |
---|
130 | $setup_info['expressoMail1_2']['currentver'] = '2.2.10'; |
---|
131 | return $setup_info['expressoMail1_2']['currentver']; |
---|
132 | } |
---|
133 | $test[] = '2.2.10'; |
---|
134 | function expressoMail1_2_upgrade2_2_10() { |
---|
135 | $setup_info['expressoMail1_2']['currentver'] = '2.3.0'; |
---|
136 | return $setup_info['expressoMail1_2']['currentver']; |
---|
137 | } |
---|
138 | $test[] = '2.3.0'; |
---|
139 | function expressoMail1_2_upgrade2_3_0() { |
---|
140 | $setup_info['expressoMail1_2']['currentver'] = '2.4.0'; |
---|
141 | return $setup_info['expressoMail1_2']['currentver']; |
---|
142 | } |
---|
143 | $test[] = '2.4.0'; |
---|
144 | function expressoMail1_2_upgrade2_4_0() { |
---|
145 | $oProc = $GLOBALS['phpgw_setup']->oProc; |
---|
146 | $oProc->CreateTable('expressomail_label',array( |
---|
147 | 'fd' => array( |
---|
148 | 'id' => array('type' => 'auto','nullable' => False), |
---|
149 | 'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true), |
---|
150 | 'name' => array('type' => 'varchar','precision' => '255','nullable' => true), |
---|
151 | 'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true), |
---|
152 | 'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true), |
---|
153 | 'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true) |
---|
154 | ), |
---|
155 | 'pk' => array('id'), |
---|
156 | 'fk' => array(), |
---|
157 | 'ix' => array(), |
---|
158 | 'uc' => array() |
---|
159 | ) |
---|
160 | ); |
---|
161 | $oProc->CreateTable('expressomail_followupflag',array( |
---|
162 | 'fd' => array( |
---|
163 | 'id' => array('type' => 'auto','nullable' => False), |
---|
164 | 'user_id' => array('type' => 'int', 'precision' => '8','nullable' => true), |
---|
165 | 'name' => array('type' => 'varchar','precision' => '255','nullable' => False) |
---|
166 | ), |
---|
167 | 'pk' => array('id'), |
---|
168 | 'fk' => array(), |
---|
169 | 'ix' => array(), |
---|
170 | 'uc' => array() |
---|
171 | ) |
---|
172 | ); |
---|
173 | $oProc->CreateTable('expressomail_message_followupflag',array( |
---|
174 | 'fd' => array( |
---|
175 | 'id' => array('type' => 'auto','nullable' => False), |
---|
176 | 'followupflag_id' => array('type' => 'int', 'precision' => '8','nullable' => False), |
---|
177 | 'border_color' => array('type' => 'varchar','precision' => '7','nullable' => true), |
---|
178 | 'background_color' => array('type' => 'varchar','precision' => '7','nullable' => true), |
---|
179 | 'font_color' => array('type' => 'varchar','precision' => '7','nullable' => true), |
---|
180 | 'alarm_deadline' => array('type' => 'timestamp', 'nullable' => true), |
---|
181 | 'done_deadline' => array('type' => 'timestamp', 'nullable' => true), |
---|
182 | 'is_done' => array('type' => 'int', 'precision' => '8','nullable' => true) |
---|
183 | ), |
---|
184 | 'pk' => array('id'), |
---|
185 | 'fk' => array(), |
---|
186 | 'ix' => array(), |
---|
187 | 'uc' => array() |
---|
188 | ) |
---|
189 | ); |
---|
190 | $oProc->query("ALTER TABLE expressomail_message_followupflag ADD CONSTRAINT expressomail_message_followupflag_followupflag_id_fkey FOREIGN KEY (followupflag_id) REFERENCES expressomail_followupflag (id);"); |
---|
191 | |
---|
192 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Follow up');"); |
---|
193 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Read');"); |
---|
194 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Forward');"); |
---|
195 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Answer');"); |
---|
196 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Don''t forward');"); |
---|
197 | $oProc->query("INSERT INTO expressomail_followupflag(name) VALUES ('Don''t answer');"); |
---|
198 | |
---|
199 | //Insert reservados para as labels padrões referentes ao thunderbir |
---|
200 | $oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('Important', '#ff0000', '#ff0000', '#ffffff');"); |
---|
201 | $oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('Work', '#ff9900', '#ff9900', '#ffffff');"); |
---|
202 | $oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('personal', '#009900', '#009900', '#ffffff');"); |
---|
203 | $oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('todo', '#3333ff', '#3333ff', '#ffffff');"); |
---|
204 | $oProc->query("INSERT INTO expressomail_label(name, font_color, border_color, background_color) VALUES ('later', '#993399', '#993399', '#ffffff');"); |
---|
205 | |
---|
206 | $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.1'; |
---|
207 | return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; |
---|
208 | } |
---|
209 | $test[] = '2.4.1'; |
---|
210 | function expressoMail1_2_upgrade2_4_1() { |
---|
211 | $oProc = $GLOBALS['phpgw_setup']->oProc; |
---|
212 | $oProc->CreateTable('expressomail_attachment',array( |
---|
213 | 'fd' => array( |
---|
214 | 'id' => array('type' => 'auto','nullable' => False), |
---|
215 | 'source' => array('type' => 'blob','nullable' => False), |
---|
216 | 'type' => array('type' => 'varchar','precision' => '255','nullable' => False), |
---|
217 | 'name' => array('type' => 'varchar','precision' => '255','nullable' => False), |
---|
218 | 'disposition' => array('type' => 'varchar','precision' => '20','nullable' => true), |
---|
219 | 'size' => array('type' => 'int','precision' => '16','nullable' => False), |
---|
220 | 'dtstamp' => array('type' => 'int','precision' => '16','nullable' => False), |
---|
221 | 'owner' => array('type' => 'int', 'precision' => '8','nullable' => True) |
---|
222 | ), |
---|
223 | 'pk' => array('id'), |
---|
224 | 'fk' => array(), |
---|
225 | 'ix' => array(), |
---|
226 | 'uc' => array() |
---|
227 | ) |
---|
228 | ); |
---|
229 | $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '2.4.2'; |
---|
230 | return $GLOBALS['setup_info']['expressoMail1_2']['currentver']; |
---|
231 | } |
---|
232 | ?> |
---|