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

Revision 538, 3.5 KB checked in by niltonneto, 16 years ago (diff)

Publicação da versão

Line 
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        $test[] = '1.231';                                                                                                     
12        function expressoMail1_2_upgrade1_231() {
13                $setup_info['expressoMail1_2']['currentver'] = '1.232';
14                return $setup_info['expressoMail1_2']['currentver'];
15        }
16       
17        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.230'){ // TESTE necessario porque a API nao   
18                $test[] = '1.230';                                                                                                       // reconhece mudancas de versões onde,
19                function expressoMail1_2_upgrade1_230() {                                                        // ((nova_versao - versao_atual) < 3),
20                        global $setup_info, $phpgw_setup;                                                                // entao e necessario "burlar" a API.
21                $phpgw_setup->oProc->CreateTable('phpgw_expressomail_contacts',array(
22                                'fd' => array(
23                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
24                                        'data' => array( 'type' => 'text')
25                                ),
26                                'pk' => array('id_owner'),
27                                'fk' => array(),
28                                'ix' => array(),
29                                'uc' => array()
30                        )
31                );
32                $setup_info['expressoMail1_2']['currentver'] = '1.231';
33                        return $setup_info['expressoMail1_2']['currentver'];
34                }
35        }
36        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.222'){
37                $test[] = '1.222';
38                function expressoMail1_2_upgrade1_222() {
39                        global $setup_info, $phpgw_setup;
40                $phpgw_setup->oProc->CreateTable('phpgw_expressomail_contacts',array(
41                                'fd' => array(
42                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
43                                        'data' => array( 'type' => 'text')
44                                ),
45                                'pk' => array('id_owner'),
46                                'fk' => array(),
47                                'ix' => array(),
48                                'uc' => array()
49                        )
50                );
51                $setup_info['expressoMail1_2']['currentver'] = '1.231';
52                        return $setup_info['expressoMail1_2']['currentver'];
53                }
54        }
55        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2211'){
56                $test[] = '1.2211';
57                function expressoMail1_2_upgrade1_2211() {
58                        global $setup_info, $phpgw_setup;
59                $phpgw_setup->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                );
70                $setup_info['expressoMail1_2']['currentver'] = '1.231';
71                        return $setup_info['expressoMail1_2']['currentver'];
72                }
73        }
74       
75        if ($GLOBALS['setup_info']['expressoMail1_2']['currentver'] == '1.2031'){
76                $test[] = '1.2031';
77                function expressoMail1_2_upgrade1_2031() {
78                        $oProc = $GLOBALS['phpgw_setup']->oProc;
79                        $oProc->CreateTable('phpgw_expressomail_contacts',array(
80                                'fd' => array(
81                                        'id_owner' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false),
82                                        'data' => array( 'type' => 'text')
83                                ),
84                                'pk' => array('id_owner'),
85                                'fk' => array(),
86                                'ix' => array(),
87                                'uc' => array()
88                                )
89                        );
90                        $GLOBALS['setup_info']['expressoMail1_2']['currentver'] = '1.231';
91                        return $GLOBALS['setup_info']['expressoMail1_2']['currentver'];
92                }
93        }       
94?>
Note: See TracBrowser for help on using the repository browser.