mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-24 22:21:34 +01:00
make egw_addressbook.account_id unique, as it should be and to speed up the join with the accounts-table
This commit is contained in:
parent
325d849332
commit
c22ac6678c
@ -14,7 +14,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.3.010';
|
$setup_info['phpgwapi']['version'] = '1.3.011';
|
||||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
|
$setup_info['phpgwapi']['versions']['current_header'] = '1.28';
|
||||||
$setup_info['phpgwapi']['enable'] = 3;
|
$setup_info['phpgwapi']['enable'] = 3;
|
||||||
$setup_info['phpgwapi']['app_order'] = 1;
|
$setup_info['phpgwapi']['app_order'] = 1;
|
||||||
@ -70,3 +70,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -549,12 +549,12 @@
|
|||||||
'contact_modified' => array('type' => 'int','precision' => '8','nullable' => False),
|
'contact_modified' => array('type' => 'int','precision' => '8','nullable' => False),
|
||||||
'contact_modifier' => array('type' => 'int','precision' => '4'),
|
'contact_modifier' => array('type' => 'int','precision' => '4'),
|
||||||
'contact_jpegphoto' => array('type' => 'blob'),
|
'contact_jpegphoto' => array('type' => 'blob'),
|
||||||
'account_id' => array('type' => 'int','precision' => '4','default' => '0')
|
'account_id' => array('type' => 'int','precision' => '4')
|
||||||
),
|
),
|
||||||
'pk' => array('contact_id'),
|
'pk' => array('contact_id'),
|
||||||
'fk' => array(),
|
'fk' => array(),
|
||||||
'ix' => array('contact_owner','cat_id','n_fileas',array('n_family','n_given'),array('n_given','n_family'),array('org_name','n_family','n_given')),
|
'ix' => array('contact_owner','cat_id','n_fileas',array('n_family','n_given'),array('n_given','n_family'),array('org_name','n_family','n_given')),
|
||||||
'uc' => array()
|
'uc' => array('account_id')
|
||||||
),
|
),
|
||||||
'egw_addressbook_extra' => array(
|
'egw_addressbook_extra' => array(
|
||||||
'fd' => array(
|
'fd' => array(
|
||||||
|
@ -573,4 +573,20 @@
|
|||||||
|
|
||||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.010';
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.010';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$test[] = '1.3.010';
|
||||||
|
function phpgwapi_upgrade1_3_010()
|
||||||
|
{
|
||||||
|
// account_id should be unique, the (unique) index also speed up the joins with the account-table
|
||||||
|
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_addressbook','account_id',array(
|
||||||
|
'type' => 'int',
|
||||||
|
'precision' => '4'
|
||||||
|
));
|
||||||
|
$GLOBALS['egw_setup']->db->query('UPDATE egw_addressbook SET account_id=NULL WHERE account_id=0',__LINE__,__FILE__);
|
||||||
|
|
||||||
|
$GLOBALS['egw_setup']->oProc->CreateIndex('egw_addressbook',array('account_id'),true);
|
||||||
|
|
||||||
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.3.011';
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user