Add index to improve import of contacts using a custom field as primary key

This commit is contained in:
Ralf Becker 2010-09-15 13:34:01 +00:00
parent 1e9695dbc9
commit 8e55c897ab
3 changed files with 15 additions and 2 deletions

View File

@ -12,7 +12,7 @@
/* Basic information about this app */ /* Basic information about this app */
$setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'eGroupWare API'; $setup_info['phpgwapi']['title'] = 'eGroupWare API';
$setup_info['phpgwapi']['version'] = '1.9.001'; $setup_info['phpgwapi']['version'] = '1.9.002';
$setup_info['phpgwapi']['versions']['current_header'] = '1.29'; $setup_info['phpgwapi']['versions']['current_header'] = '1.29';
$setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1; $setup_info['phpgwapi']['app_order'] = 1;

View File

@ -403,7 +403,7 @@ $phpgw_baseline = array(
), ),
'pk' => array('contact_id','contact_name'), 'pk' => array('contact_id','contact_name'),
'fk' => array(), 'fk' => array(),
'ix' => array(), 'ix' => array(array('contact_name','contact_value(32)')),
'uc' => array() 'uc' => array()
), ),
'egw_addressbook_lists' => array( 'egw_addressbook_lists' => array(

View File

@ -28,3 +28,16 @@ function phpgwapi_upgrade1_8_001()
{ {
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.001'; return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.001';
} }
/**
* Add index to improve import of contacts using a custom field as primary key
*
* @return string
*/
function phpgwapi_upgrade1_9_001()
{
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_addressbook_extra',
array('contact_name','contact_value(32)'));
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.9.002';
}