[2] | 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[] = '0.4.1'; |
---|
| 12 | function contactcenter_upgrade0_4_1() { |
---|
| 13 | |
---|
| 14 | $oProc = $GLOBALS['phpgw_setup']->oProc; |
---|
| 15 | $oProc->DropTable('phpgw_cc_city'); |
---|
| 16 | $oProc->DropTable('phpgw_cc_state'); |
---|
| 17 | $oProc->CreateTable( |
---|
| 18 | 'phpgw_cc_state',array( |
---|
| 19 | 'fd' => array( |
---|
| 20 | 'id_state' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false), |
---|
| 21 | 'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2), |
---|
| 22 | 'state_name' => array( 'type' => 'varchar', 'precision' => 30), |
---|
| 23 | 'state_symbol' => array( 'type' => 'varchar', 'precision' => 10) |
---|
| 24 | ), |
---|
| 25 | 'pk' => array('id_state'), |
---|
| 26 | 'fk' => array('id_country' => array('phpgw_common_country_list' => 'id_country')), |
---|
| 27 | 'ix' => array(), |
---|
| 28 | 'uc' => array() |
---|
| 29 | ) |
---|
| 30 | ); |
---|
| 31 | $oProc->CreateTable( |
---|
| 32 | 'phpgw_cc_city', array( |
---|
| 33 | 'fd' => array( |
---|
| 34 | 'id_city' => array( 'type' => 'int', 'precision' => 8, 'nullable' => false ), |
---|
| 35 | 'id_state' => array( 'type' => 'int', 'precision' => 8 ), |
---|
| 36 | 'id_country' => array( 'type' => 'char', 'nullable' => false, 'precision' => 2), |
---|
| 37 | 'city_timezone' => array( 'type' => 'int', 'precision' => 2 ), |
---|
| 38 | 'city_geo_location' => array( 'type' => 'varchar', 'precision' => 40 ), |
---|
| 39 | 'city_name' => array( 'type' => 'varchar', 'precision' => 60, 'nullable' => 'false' ), |
---|
| 40 | ), |
---|
| 41 | 'pk' => array('id_city'), |
---|
| 42 | 'fk' => array('id_state' => array('phpgw_cc_state' => 'id_state') ), |
---|
| 43 | 'ix' => array(), |
---|
| 44 | 'uc' => array() |
---|
| 45 | ) |
---|
| 46 | ); |
---|
| 47 | |
---|
| 48 | include("states_pt-br.inc.php"); |
---|
| 49 | include("cities_pt-br.inc.php"); |
---|
| 50 | $GLOBALS['setup_info']['contactcenter']['currentver'] = '1.0.0'; |
---|
| 51 | return $GLOBALS['setup_info']['contactcenter']['currentver']; |
---|
| 52 | } |
---|
| 53 | $test[] = '1.0.0'; |
---|
| 54 | function contactcenter_upgrade1_0_0() { |
---|
| 55 | $GLOBALS['setup_info']['contactcenter']['currentver'] = '1.0.005'; |
---|
| 56 | return $GLOBALS['setup_info']['contactcenter']['currentver']; |
---|
| 57 | } |
---|
| 58 | ?> |
---|