source: branches/2.2.0.1/contactcenter/setup/tables_update.inc.php @ 4526

Revision 4526, 3.6 KB checked in by brunocosta, 10 years ago (diff)

Ticket #1940 - Alterando versão de aplicativos para 2.2.0.1. .

  • Property svn:eol-style set to native
  • Property svn:executable set to *
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        // Since Expresso 1.2 using ContactCenter 1.21
12        $test[] = '1.21';
13        function contactcenter_upgrade1_21() {
14                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.0.000';
15                // Bug fixing for type cast problem PGSQL version > 8.1. Replacing trigger function:
16                        $GLOBALS['phpgw_setup']->db->query("CREATE OR REPLACE function share_catalog_delete() returns trigger as '".
17                                        "begin if old.acl_appname = ''contactcenter'' and old.acl_location!=''run'' then delete from ".
18                                        "phpgw_cc_contact_rels where id_contact=old.acl_location::bigint and id_related=old.acl_account ".
19                                        "and id_typeof_contact_relation=1; end if; return new; end;' language 'plpgsql'");
20                return $GLOBALS['setup_info']['contactcenter']['currentver'];
21        }
22        $test[] = '2.0.000';
23        function contactcenter_upgrade2_0_000() {
24                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.0.001';
25                return $GLOBALS['setup_info']['contactcenter']['currentver'];
26        }
27        $test[] = '2.0.001';
28        function contactcenter_upgrade2_0_001() {
29                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.0.002';
30                return $GLOBALS['setup_info']['contactcenter']['currentver'];
31        }               
32        $test[] = '2.0.002';
33        function contactcenter_upgrade2_0_002() {
34                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.0.003';
35                return $GLOBALS['setup_info']['contactcenter']['currentver'];
36        }       
37        $test[] = '2.0.003';
38        function contactcenter_upgrade2_0_003() {
39                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.0.004';
40                return $GLOBALS['setup_info']['contactcenter']['currentver'];
41        }
42        $test[] = '2.0.004';
43        function contactcenter_upgrade2_0_004() {
44                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.1.000';
45                return $GLOBALS['setup_info']['contactcenter']['currentver'];
46        }       
47        $test[] = '2.1.000';
48        function contactcenter_upgrade2_1_000() {               
49                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN web_page character varying(100)");
50                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN corporate_name character varying(100)");
51                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN job_title character varying(40)");
52                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ADD COLUMN department character varying(30)");
53                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.000';
54                return $GLOBALS['setup_info']['contactcenter']['currentver'];
55        }
56        $test[] = '2.2.000';
57        function contactcenter_upgrade2_2_000() {
58                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.0.1';
59                return $GLOBALS['setup_info']['contactcenter']['currentver'];
60        }
61        $test[] = '2.2.1';
62        function contactcenter_upgrade2_2_1() {
63                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.2';
64                return $GLOBALS['setup_info']['contactcenter']['currentver'];
65        }
66        $test[] = '2.2.2';
67        function contactcenter_upgrade2_2_2() {
68                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.3';
69                return $GLOBALS['setup_info']['contactcenter']['currentver'];
70        }
71?>
Note: See TracBrowser for help on using the repository browser.