Changeset 5311


Ignore:
Timestamp:
01/05/12 09:51:14 (12 years ago)
Author:
niltonneto
Message:

Ticket #2409 - Corrigido tables_update da API e dos módulos que possuem.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/setup/tables_update.inc.php

    r5203 r5311  
    1616                                        return; 
    1717                        } 
    18                 }                
     18                } 
    1919                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE ".$table." ADD COLUMN ".$column." ".$attrs); 
    20         }   
    21         $test[] = '0.9.2'; 
    22         function calendar_upgrade0_9_2() 
    23         { 
    24                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.17'; 
    25                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    2620        } 
    27         $test[] = '0.9.17'; 
    28         function calendar_upgrade0_9_17() 
    29         { 
    30                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; 
    31                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    32         } 
    33         $test[] = '0.9.20'; 
    34         function calendar_upgrade0_9_20() 
    35         { 
    36                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.21'; 
    37                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    38         }        
    39         $test[] = '0.9.21'; 
    40         function calendar_upgrade0_9_21() 
    41         { 
    42                 addSpecialColumn("phpgw_cal","last_status","char(1) DEFAULT 'N'::bpchar"); 
    43                 addSpecialColumn("phpgw_cal","last_update","int8 DEFAULT (date_part('epoch'::text, ('now'::text)::timestamp(3) with time zone) * (1000)::double precision)"); 
    44                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.22'; 
    45                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    46         }        
    47         $test[] = '0.9.22'; 
    48         function calendar_upgrade0_9_22() 
    49         { 
    50                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.23'; 
    51                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    52         } 
    53         $test[] = '0.9.23'; 
    54         function calendar_upgrade0_9_23() 
    55         { 
    56                 $GLOBALS['setup_info']['calendar']['currentver'] = '0.9.3'; 
    57                 return $GLOBALS['setup_info']['calendar']['currentver']; 
    58         }        
     21/// Since Expresso 1.2 using Calendar 0.9.3 
    5922        $test[] = '0.9.3'; 
    6023        function calendar_upgrade0_9_3() 
     
    10265        function calendar_upgrade2_0_006() { 
    10366                $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.007'; 
    104                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ALTER COLUMN title TYPE character varying(1024);"); 
    10567                return $GLOBALS['setup_info']['calendar']['currentver']; 
    10668        }                
    10769        $test[] = '2.0.007'; 
    108         function calendar_upgrade2_0_007() { 
    109                 $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.008'; 
    110                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN organizer character varying(255);"); 
     70        function calendar_upgrade2_0_007() 
     71        { 
     72                $GLOBALS['setup_info']['calendar']['currentver'] = '2.1.000'; 
     73                return $GLOBALS['setup_info']['calendar']['currentver']; 
     74        } 
     75        $test[] = '2.1.000'; 
     76        function calendar_upgrade2_1_000() 
     77        { 
     78                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.000'; 
     79                return $GLOBALS['setup_info']['calendar']['currentver']; 
     80        } 
     81        $test[] = '2.2.000'; 
     82        function calendar_upgrade2_2_000() 
     83        { 
     84                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.1'; 
     85                return $GLOBALS['setup_info']['calendar']['currentver']; 
     86        } 
     87        $test[] = '2.2.1'; 
     88        function calendar_upgrade2_2_1() 
     89        { 
     90                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.6'; 
     91                return $GLOBALS['setup_info']['calendar']['currentver']; 
     92        } 
     93        $test[] = '2.2.6'; 
     94        function calendar_upgrade2_2_6() 
     95        { 
     96                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.8'; 
     97                return $GLOBALS['setup_info']['calendar']['currentver']; 
     98        } 
     99        $test[] = '2.2.8'; 
     100        function calendar_upgrade2_2_8() 
     101        { 
     102                $GLOBALS['setup_info']['calendar']['currentver'] = '2.2.10'; 
     103                return $GLOBALS['setup_info']['calendar']['currentver']; 
     104        } 
     105        $test[] = '2.2.10'; 
     106        function calendar_upgrade2_2_10() 
     107        { 
     108            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN notifications_owner INT NOT NULL default '0'"); 
     109                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text"); 
     110            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN alter_by varchar(160)"); 
     111            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN attachment text"); 
     112            $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN organizer character varying(255);"); 
     113                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ALTER title TYPE varchar(1024)"); 
     114                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal_repeats ALTER recur_exception TYPE varchar"); 
     115            $GLOBALS['setup_info']['calendar']['currentver'] = '2.3.0'; 
    111116            return $GLOBALS['setup_info']['calendar']['currentver']; 
    112117        } 
    113          
    114                 $test[] = '2.0.008'; 
    115         function calendar_upgrade2_0_008() { 
    116                 $GLOBALS['setup_info']['calendar']['currentver'] = '2.0.009'; 
    117                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN observations text;"); 
    118                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN attachment text;"); 
    119                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cal ADD COLUMN alter_by character varying(160);"); 
    120             return $GLOBALS['setup_info']['calendar']['currentver']; 
     118        $test[] = '2.3.0'; 
     119        function calendar_upgrade2_3_0() 
     120        { 
     121                $GLOBALS['setup_info']['calendar']['currentver'] = '2.4.0'; 
     122                return $GLOBALS['setup_info']['calendar']['currentver']; 
    121123        } 
    122124?> 
  • trunk/contactcenter/setup/tables_update.inc.php

    r5131 r5311  
    6666        } 
    6767         
    68         $test[] = '2.2.3';  
    69         function contactcenter_upgrade2_2_3() {  
    70                 $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ALTER COLUMN alias TYPE character varying(100);"); 
    71             $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.3.1'; 
    72                 return $GLOBALS['setup_info']['contactcenter']['currentver'];  
     68        $test[] = '2.2.2'; 
     69        function contactcenter_upgrade2_2_2() { 
     70                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.3'; 
     71                return $GLOBALS['setup_info']['contactcenter']['currentver']; 
    7372        } 
    74         $test[] = '2.2.3.1';  
    75         function contactcenter_upgrade2_2_3_1() {  
    76             $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.4.0'; 
    77                 return $GLOBALS['setup_info']['contactcenter']['currentver'];  
     73        $test[] = '2.2.3'; 
     74        function contactcenter_upgrade2_2_3() { 
     75                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.2.10'; 
     76                return $GLOBALS['setup_info']['contactcenter']['currentver']; 
     77        }        
     78        $test[] = '2.2.10'; 
     79        function contactcenter_upgrade2_2_10() { 
     80                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.3.0'; 
     81                return $GLOBALS['setup_info']['contactcenter']['currentver']; 
     82        } 
     83        $test[] = '2.3.0'; 
     84        function contactcenter_upgrade2_3_0() { 
     85                $GLOBALS['phpgw_setup']->db->query("ALTER TABLE phpgw_cc_contact ALTER COLUMN alias TYPE character varying(100);"); 
     86                $GLOBALS['setup_info']['contactcenter']['currentver'] = '2.4.0'; 
     87                return $GLOBALS['setup_info']['contactcenter']['currentver']; 
    7888        } 
    7989?> 
  • trunk/expressoAdmin1_2/setup/tables_update.inc.php

    r5133 r5311  
    8989        { 
    9090                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.0.005'; 
    91                 //$GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop groupinfo"); 
    92                 //$GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop appinfo"); 
    93                 //$GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop msg");/ 
    94          
    9591                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
    9692        } 
    9793        $test[] = '2.0.005'; 
    98         function expressoAdmin1_2_upgrade2_0_005() { 
    99                 $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.0.006'; 
     94        function expressoAdmin1_2_upgrade2_0_005() 
     95        { 
     96                $GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop groupinfo"); 
     97                $GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop appinfo"); 
     98                $GLOBALS['phpgw_setup']->db->query("alter table phpgw_expressoadmin_log drop msg"); 
     99                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.1.000'; 
     100                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     101        } 
     102        $test[] = '2.1.000'; 
     103        function expressoAdmin1_2_upgrade2_1_000() 
     104        { 
     105                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.000'; 
     106                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     107        } 
     108        $test[] = '2.2.000'; 
     109        function expressoAdmin1_2_upgrade2_2_000() 
     110        { 
     111                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.1'; 
     112                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     113        } 
     114        $test[] = '2.2.1'; 
     115        function expressoAdmin1_2_upgrade2_2_1() 
     116        { 
     117                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.2'; 
     118                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     119        } 
     120        $test[] = '2.2.2'; 
     121        function expressoAdmin1_2_upgrade2_2_2() 
     122        { 
     123                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.3'; 
     124                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     125        } 
     126        $test[] = '2.2.3'; 
     127        function expressoAdmin1_2_upgrade2_2_3() 
     128        { 
     129                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.6'; 
     130                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     131        } 
     132        $test[] = '2.2.6'; 
     133        function expressoAdmin1_2_upgrade2_2_6() 
     134        { 
     135                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.2.8'; 
     136                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     137        }        
     138        $test[] = '2.2.8'; 
     139        function expressoAdmin1_2_upgrade2_2_8() 
     140        { 
     141                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.3.0'; 
     142                return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver']; 
     143        }        
     144        $test[] = '2.3.0'; 
     145        function expressoAdmin1_2_upgrade2_3_0() { 
    100146                $GLOBALS['phpgw_setup']->db->query(" 
    101147 
     
    268314 
    269315                 } 
    270  
     316                $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'] = '2.4.0'; 
    271317            return $GLOBALS['setup_info']['expressoAdmin1_2']['currentver'];  
    272318        }  
  • trunk/expressoMail1_2/setup/tables_update.inc.php

    r5134 r5311  
    116116            return $setup_info['expressoMail1_2']['currentver'];  
    117117        } 
    118         $test[] = '2.2.4';  
    119         function expressoMail1_2_upgrade2_2_4() {  
     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() {  
    120140            $setup_info['expressoMail1_2']['currentver'] = '2.4.0';  
    121141            return $setup_info['expressoMail1_2']['currentver'];  
  • trunk/news_admin/setup/tables_update.inc.php

    r5128 r5311  
    4646        function news_admin_upgrade2_2_1() 
    4747        { 
     48                $GLOBALS['setup_info']['news_admin']['currentver'] = '2.2.6'; 
     49                return $GLOBALS['setup_info']['news_admin']['currentver']; 
     50        } 
     51        $test[] = '2.2.6'; 
     52        function news_admin_upgrade2_2_6() 
     53        { 
     54                $GLOBALS['setup_info']['news_admin']['currentver'] = '2.2.8'; 
     55                return $GLOBALS['setup_info']['news_admin']['currentver']; 
     56        } 
     57        $test[] = '2.2.8'; 
     58        function news_admin_upgrade2_2_8() 
     59        { 
     60                $GLOBALS['setup_info']['news_admin']['currentver'] = '2.2.10'; 
     61                return $GLOBALS['setup_info']['news_admin']['currentver']; 
     62        } 
     63        $test[] = '2.2.10'; 
     64        function news_admin_upgrade2_2_10() 
     65        { 
     66                $GLOBALS['setup_info']['news_admin']['currentver'] = '2.3.0'; 
     67                return $GLOBALS['setup_info']['news_admin']['currentver']; 
     68        }        
     69        $test[] = '2.3.0'; 
     70        function news_admin_upgrade2_3_0() 
     71        { 
    4872                $GLOBALS['setup_info']['news_admin']['currentver'] = '2.4.0'; 
    4973                return $GLOBALS['setup_info']['news_admin']['currentver']; 
  • trunk/phpgwapi/setup/tables_update.inc.php

    r4306 r5311  
    116116        } 
    117117        $test[] = '2.2.1';  
    118         function phpgwapi_upgrade2_2_1()  
    119         {  
    120             $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.2';  
    121             return $GLOBALS['setup_info']['phpgwapi']['currentver'];  
    122         }  
     118        function phpgwapi_upgrade2_2_1() 
     119        { 
     120                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.2'; 
     121                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     122        } 
     123        $test[] = '2.2.2'; 
     124        function phpgwapi_upgrade2_2_2() 
     125        { 
     126                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.3'; 
     127                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     128        } 
     129        $test[] = '2.2.3'; 
     130        function phpgwapi_upgrade2_2_3() 
     131        { 
     132                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.4'; 
     133                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     134        } 
     135        $test[] = '2.2.4'; 
     136        function phpgwapi_upgrade2_2_4() 
     137        { 
     138                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.6'; 
     139                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     140        } 
     141        $test[] = '2.2.6'; 
     142        function phpgwapi_upgrade2_2_6() 
     143        { 
     144                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.8'; 
     145                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     146        } 
     147        $test[] = '2.2.8'; 
     148        function phpgwapi_upgrade2_2_8() 
     149        { 
     150                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.2.10'; 
     151                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     152        }        
     153        $test[] = '2.2.10'; 
     154        function phpgwapi_upgrade2_2_10() 
     155        { 
     156                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.3.0'; 
     157                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     158        }        
     159        $test[] = '2.3.0'; 
     160        function phpgwapi_upgrade2_3_0() 
     161        { 
     162                $GLOBALS['setup_info']['phpgwapi']['currentver'] = '2.4.0'; 
     163                return $GLOBALS['setup_info']['phpgwapi']['currentver']; 
     164        } 
    123165?> 
  • trunk/workflow/setup/tables_update.inc.php

    r5307 r5311  
    210210                return $GLOBALS['setup_info']['workflow']['currentver']; 
    211211        } 
    212          
    213         $test[] = '2.4.000'; 
    214         function workflow_upgrade2_4_000() 
     212        $test[] = '2.2.1'; 
     213        function workflow_upgrade2_2_1() 
     214        { 
     215                #updating the current version 
     216                $GLOBALS['setup_info']['workflow']['currentver'] = '2.2.6'; 
     217        return $GLOBALS['setup_info']['workflow']['currentver']; 
     218        } 
     219        $test[] = '2.2.6'; 
     220        function workflow_upgrade2_2_6() 
     221        { 
     222                #updating the current version 
     223                $GLOBALS['setup_info']['workflow']['currentver'] = '2.3.0'; 
     224        return $GLOBALS['setup_info']['workflow']['currentver']; 
     225        } 
     226        $test[] = '2.3.0'; 
     227        function workflow_upgrade2_3_0() 
    215228        { 
    216229                #updating the current version 
     
    382395                return $GLOBALS['setup_info']['workflow']['currentver']; 
    383396        } 
    384          
    385          
    386397?> 
Note: See TracChangeset for help on using the changeset viewer.