source: branches/2.4/calendar/setup/tables_update.inc.php @ 6754

Revision 6754, 5.2 KB checked in by niltonneto, 7 years ago (diff)

Ticket #0000 - Copiadas as alterações do Trunk. Versão final da 2.4.1.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2  /**************************************************************************\
3  * eGroupWare - Setup                                                       *
4  * http://www.egroupware.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        function addSpecialColumn($table,$column, $attrs){
12                $result = $GLOBALS['phpgw_setup']->db->metadata($table);
13                if($result){
14                        foreach($result as $idx => $col){
15                                if($col['name'] == $column)
16                                        return;
17                        }
18                }
19                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE ".$table." ADD COLUMN ".$column." ".$attrs);
20        }
21/// Since Expresso 1.2 using Calendar 0.9.3
22        $test[] = '0.9.3';
23        function calendar_upgrade0_9_3()
24        {
25                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.000';
26                return $GLOBALS['setup_info']['calendar']['currentver'];
27        }
28        $test[] = '2.0.000';
29        function calendar_upgrade2_0_000()
30        {
31                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.001';
32                return $GLOBALS['setup_info']['calendar']['currentver'];
33        }
34        $test[] = '2.0.001';
35        function calendar_upgrade2_0_001()
36        {
37                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.002';
38                return $GLOBALS['setup_info']['calendar']['currentver'];
39        }
40        $test[] = '2.0.002';
41        function calendar_upgrade2_0_002()
42        {
43                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.003';
44                return $GLOBALS['setup_info']['calendar']['currentver'];
45        }
46        $test[] = '2.0.003';
47        function calendar_upgrade2_0_003()
48        {
49                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.004';
50                return $GLOBALS['setup_info']['calendar']['currentver'];
51        }       
52        $test[] = '2.0.004';
53        function calendar_upgrade2_0_004()
54        {
55                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.005';
56                return $GLOBALS['setup_info']['calendar']['currentver'];
57        }       
58        $test[] = '2.0.005';
59        function calendar_upgrade2_0_005()
60        {
61                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.006';
62                return $GLOBALS['setup_info']['calendar']['currentver'];
63        }       
64        $test[] = '2.0.006';
65        function calendar_upgrade2_0_006() {
66                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.007';
67                return $GLOBALS['setup_info']['calendar']['currentver'];
68        }               
69        $test[] = '2.0.007';
70        function calendar_upgrade2_0_007()
71        {
72                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.008';
73                return $GLOBALS['setup_info']['calendar']['currentver'];
74        }
75        $test[] = '2.0.008';
76        function calendar_upgrade2_0_008()
77        {
78                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.009';
79                return $GLOBALS['setup_info']['calendar']['currentver'];
80        }
81        $test[] = '2.0.009';
82        function calendar_upgrade2_0_009()
83        {
84        $GLOBALS['setup_info']['calendar']['currentver'] = '2.1.000';
85                return $GLOBALS['setup_info']['calendar']['currentver'];
86        }       
87        $test[] = '2.1.000';
88        function calendar_upgrade2_1_000()
89        {
90                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.000';
91                return $GLOBALS['setup_info']['calendar']['currentver'];
92        }
93        $test[] = '2.2.000';
94        function calendar_upgrade2_2_000()
95        {
96                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.1';
97                return $GLOBALS['setup_info']['calendar']['currentver'];
98        }
99        $test[] = '2.2.1';
100        function calendar_upgrade2_2_1()
101        {
102                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.6';
103                return $GLOBALS['setup_info']['calendar']['currentver'];
104        }
105        $test[] = '2.2.6';
106        function calendar_upgrade2_2_6()
107        {
108                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.8';
109                return $GLOBALS['setup_info']['calendar']['currentver'];
110        }
111        $test[] = '2.2.8';
112        function calendar_upgrade2_2_8()
113        {
114                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.10';
115                return $GLOBALS['setup_info']['calendar']['currentver'];
116        }
117        $test[] = '2.2.10';
118        function calendar_upgrade2_2_10()
119        {
120            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN notifications_owner INT NOT NULL default '0'");
121                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text");
122            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN alter_by varchar(160)");
123            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN attachment text");
124            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN organizer character varying(255);");
125                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ALTER title TYPE varchar(1024)");
126                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal_repeats ALTER recur_exception TYPE varchar");
127            $GLOBALS['setup_info']['calendar']['currentver'] = '2.3.0';
128            return $GLOBALS['setup_info']['calendar']['currentver'];
129        }
130        $test[] = '2.3.0';
131        function calendar_upgrade2_3_0()
132        {
133                $GLOBALS['setup_info']['calendar']['currentver'] = '2.4.0';
134                return $GLOBALS['setup_info']['calendar']['currentver'];
135        }
136
137        $test[] = '2.4.0';
138        function calendar_upgrade2_4_0()
139        {
140                $GLOBALS['setup_info']['calendar']['currentver'] = '2.4.1';
141                return $GLOBALS['setup_info']['calendar']['currentver'];
142        }
143?>
Note: See TracBrowser for help on using the repository browser.