Add two extra columns to store the ISO country code for contacts

This commit is contained in:
Nathan Gray 2010-09-27 23:00:11 +00:00
parent 8be41b7976
commit 6029b5043f
3 changed files with 20 additions and 2 deletions

View File

@ -12,7 +12,7 @@
/* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'eGroupWare API';
$setup_info['phpgwapi']['version'] = '1.9.003';
$setup_info['phpgwapi']['version'] = '1.9.004';
$setup_info['phpgwapi']['versions']['current_header'] = '1.29';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
@ -78,3 +78,4 @@ $setup_info['groupdav']['license'] = 'GPL';

View File

@ -388,7 +388,9 @@ $phpgw_baseline = array(
'contact_jpegphoto' => array('type' => 'blob'),
'account_id' => array('type' => 'int','precision' => '4'),
'contact_etag' => array('type' => 'int','precision' => '4','default' => '0'),
'contact_uid' => array('type' => 'varchar','precision' => '255')
'contact_uid' => array('type' => 'varchar','precision' => '255'),
'adr_one_countrycode' => array('type' => 'varchar','precision' => '2'),
'adr_two_countrycode' => array('type' => 'varchar','precision' => '2')
),
'pk' => array('contact_id'),
'fk' => array(),

View File

@ -69,3 +69,18 @@ function phpgwapi_upgrade1_9_002()
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.003';
}
function phpgwapi_upgrade1_9_003()
{
$GLOBALS['egw_setup']->oProc->AddColumn('egw_addressbook','adr_one_countrycode',array(
'type' => 'varchar',
'precision' => '2'
));
$GLOBALS['egw_setup']->oProc->AddColumn('egw_addressbook','adr_two_countrycode',array(
'type' => 'varchar',
'precision' => '2'
));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.004';
}