source: trunk/expressoMail1_2/setup/tables_update.inc.php @ 1038

Revision 1038, 6.3 KB checked in by niltonneto, 15 years ago (diff)

Ticket #558 - Correção de problema de atualização de versão.

Line 
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        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.234'){
12                $test[] = '1.234';
13                function expressoMail1_2_upgrade1_234() {
14            $oProc = $GLOBALS['phpgw_setup']->oProc;           
15            $oProc->CreateTable('phpgw_certificados',array(
16                                'fd' => array(
17                                        'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
18                                        'chave_publica' => array( 'type' => 'text'),
19                                        'expirado' => array('type' => 'bool', 'default' => 'false'),
20                                        'revogado' => array('type' => 'bool', 'default' => 'false'),
21                                        'serialnumber' => array('type' => 'int', 'precision' => 8, 'nullable' => false),
22                                        'authoritykeyidentifier' => array( 'type' => 'text', 'nullable' => false),
23                                ),
24                                'pk' => array('email','serialnumber','authoritykeyidentifier'),
25                                'fk' => array(),
26                                'ix' => array(),
27                                'uc' => array()
28                                )
29                        );
30
31            $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.235';
32            return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
33                }
34        }
35        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.233'){
36                $test[] = '1.233';                                                                                                     
37                function expressoMail1_2_upgrade1_233() {
38                        $setup_info['expressoMail1_2']['currentver'] = '1.234';
39                        return $setup_info['expressoMail1_2']['currentver'];
40                }
41        }       
42        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.232'){
43                $test[] = '1.232';                                                                                                     
44                function expressoMail1_2_upgrade1_232() {
45                        $setup_info['expressoMail1_2']['currentver'] = '1.233';
46                        return $setup_info['expressoMail1_2']['currentver'];
47                }
48        }       
49        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.231'){
50                $test[] = '1.231';                                                                                                     
51                function expressoMail1_2_upgrade1_231() {
52                        $setup_info['expressoMail1_2']['currentver'] = '1.232';
53                        return $setup_info['expressoMail1_2']['currentver'];
54                }
55        }
56       
57        function expressoMail1_2_upgrade1_230() {
58                $oProc = $GLOBALS['phpgw_setup']->oProc;
59                $oProc->CreateTable('phpgw_expressomail_contacts',array(
60                        'fd' => array(
61                                'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
62                                'data' => array( 'type' => 'text')
63                        ),
64                        'pk' => array('id_owner'),
65                        'fk' => array(),
66                        'ix' => array(),
67                        'uc' => array() )
68                );
69                $setup_info['expressoMail1_2']['currentver'] = '1.231';
70                return $setup_info['expressoMail1_2']['currentver'];
71        }               
72                               
73        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.230'){
74                $test[] = '1.230';                                                                                                     
75                return expressoMail1_2_upgrade1_230();
76        }
77        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.222'){
78                $test[] = '1.222';
79                function expressoMail1_2_upgrade1_222() {
80                        $oProc = $GLOBALS['phpgw_setup']->oProc;
81                        $oProc->CreateTable('phpgw_expressomail_contacts',array(
82                                'fd' => array(
83                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
84                                        'data' => array( 'type' => 'text')
85                                ),
86                                'pk' => array('id_owner'),
87                                'fk' => array(),
88                                'ix' => array(),
89                                'uc' => array()
90                                )
91                        );
92                        $oProc->CreateTable('phpgw_certificados',array(
93                                'fd' => array(
94                                        'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
95                                        'chave_publica' => array( 'type' => 'text'),
96                                        'expirado' => array('type' => 'bool', 'default' => 'false')
97                                ),
98                                'pk' => array('email'),
99                                'fk' => array(),
100                                'ix' => array(),
101                                'uc' => array()
102                                )
103                        );
104                        $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
105                        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
106        }
107        }
108        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2211'){
109                $test[] = '1.2211';
110                function expressoMail1_2_upgrade1_2211() {
111                        $oProc = $GLOBALS['phpgw_setup']->oProc;
112                        $oProc->CreateTable('phpgw_expressomail_contacts',array(
113                                'fd' => array(
114                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
115                                        'data' => array( 'type' => 'text')
116                                ),
117                                'pk' => array('id_owner'),
118                                'fk' => array(),
119                                'ix' => array(),
120                                'uc' => array()
121                                )
122                        );
123                        $oProc->CreateTable('phpgw_certificados',array(
124                                'fd' => array(
125                                        'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
126                                        'chave_publica' => array( 'type' => 'text'),
127                                        'expirado' => array('type' => 'bool', 'default' => 'false')
128                                ),
129                                'pk' => array('email'),
130                                'fk' => array(),
131                                'ix' => array(),
132                                'uc' => array()
133                                )
134                        );
135                        $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
136                        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
137        }
138        }
139        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2201'){
140                $test[] = '1.2201';
141                function expressoMail1_2_upgrade1_2201() {return expressoMail1_2_upgrade1_230();}
142        }
143       
144        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2031'){
145                $test[] = '1.2031';
146                function expressoMail1_2_upgrade1_2031() {
147                        $oProc = $GLOBALS['phpgw_setup']->oProc;
148                        $oProc->CreateTable('phpgw_expressomail_contacts',array(
149                                'fd' => array(
150                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
151                                        'data' => array( 'type' => 'text')
152                                ),
153                                'pk' => array('id_owner'),
154                                'fk' => array(),
155                                'ix' => array(),
156                                'uc' => array()
157                                )
158                        );
159                        $oProc->CreateTable('phpgw_certificados',array(
160                                'fd' => array(
161                                        'email' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => false),
162                                        'chave_publica' => array( 'type' => 'text'),
163                                        'expirado' => array('type' => 'bool', 'default' => 'false')
164                                ),
165                                'pk' => array('email'),
166                                'fk' => array(),
167                                'ix' => array(),
168                                'uc' => array()
169                                )
170                        );
171                        $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.223';
172                        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
173        }
174        }       
175?>
Note: See TracBrowser for help on using the repository browser.