creating indices for infolog

This commit is contained in:
Ralf Becker 2004-06-27 09:54:57 +00:00
parent a1d4a47172
commit 3b93f3845d
3 changed files with 79 additions and 13 deletions

View File

@ -12,7 +12,7 @@
/* $Id$ */ /* $Id$ */
$setup_info['infolog']['name'] = 'infolog'; $setup_info['infolog']['name'] = 'infolog';
$setup_info['infolog']['version'] = '0.9.15.006'; $setup_info['infolog']['version'] = '0.9.15.008';
$setup_info['infolog']['app_order'] = 5; $setup_info['infolog']['app_order'] = 5;
$setup_info['infolog']['tables'] = array('phpgw_infolog','phpgw_links','phpgw_infolog_extra'); $setup_info['infolog']['tables'] = array('phpgw_infolog','phpgw_links','phpgw_infolog_extra');
$setup_info['infolog']['enable'] = 1; $setup_info['infolog']['enable'] = 1;
@ -69,4 +69,5 @@
'appname' => 'etemplate', 'appname' => 'etemplate',
'versions' => Array('0.9.15','0.9.16','1.0.0') 'versions' => Array('0.9.15','0.9.16','1.0.0')
); );
?>

View File

@ -16,29 +16,29 @@
'fd' => array( 'fd' => array(
'info_id' => array('type' => 'auto','nullable' => False), 'info_id' => array('type' => 'auto','nullable' => False),
'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'), 'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'),
'info_from' => array('type' => 'varchar','precision' => '64','nullable' => True), 'info_from' => array('type' => 'varchar','precision' => '64'),
'info_addr' => array('type' => 'varchar','precision' => '64','nullable' => True), 'info_addr' => array('type' => 'varchar','precision' => '64'),
'info_subject' => array('type' => 'varchar','precision' => '64','nullable' => True), 'info_subject' => array('type' => 'varchar','precision' => '64'),
'info_des' => array('type' => 'text','nullable' => True), 'info_des' => array('type' => 'text'),
'info_owner' => array('type' => 'int','precision' => '4','nullable' => False), 'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_access' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'public'), 'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'),
'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False), 'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
'info_startdate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_startdate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_enddate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_enddate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_pri' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'normal'), 'info_pri' => array('type' => 'varchar','precision' => '10','default' => 'normal'),
'info_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_bill_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_bill_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_status' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'done'), 'info_status' => array('type' => 'varchar','precision' => '10','default' => 'done'),
'info_confirm' => array('type' => 'varchar','precision' => '10','nullable' => True,'default' => 'not'), 'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'),
'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'), 'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0') 'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0')
), ),
'pk' => array('info_id'), 'pk' => array('info_id'),
'fk' => array(), 'fk' => array(),
'ix' => array(), 'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
'uc' => array() 'uc' => array()
), ),
'phpgw_links' => array( 'phpgw_links' => array(
@ -48,13 +48,13 @@
'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False), 'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False), 'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False), 'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
'link_remark' => array('type' => 'varchar','precision' => '50','nullable' => True), 'link_remark' => array('type' => 'varchar','precision' => '50'),
'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False), 'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
'link_owner' => array('type' => 'int','precision' => '4','nullable' => False) 'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
), ),
'pk' => array('link_id'), 'pk' => array('link_id'),
'fk' => array(), 'fk' => array(),
'ix' => array(), 'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
'uc' => array() 'uc' => array()
), ),
'phpgw_infolog_extra' => array( 'phpgw_infolog_extra' => array(

View File

@ -259,4 +259,69 @@
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.006'; $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.006';
return $GLOBALS['setup_info']['infolog']['currentver']; return $GLOBALS['setup_info']['infolog']['currentver'];
} }
// the following series of updates add some indices, to speedup the selects
$test[] = '0.9.15.006';
function infolog_upgrade0_9_15_006()
{
$GLOBALS['phpgw_setup']->oProc->RefreshTable('phpgw_links',array(
'fd' => array(
'link_id' => array('type' => 'auto','nullable' => False),
'link_app1' => array('type' => 'varchar','precision' => '25','nullable' => False),
'link_id1' => array('type' => 'varchar','precision' => '50','nullable' => False),
'link_app2' => array('type' => 'varchar','precision' => '25','nullable' => False),
'link_id2' => array('type' => 'varchar','precision' => '50','nullable' => False),
'link_remark' => array('type' => 'varchar','precision' => '50'),
'link_lastmod' => array('type' => 'int','precision' => '4','nullable' => False),
'link_owner' => array('type' => 'int','precision' => '4','nullable' => False)
),
'pk' => array('link_id'),
'fk' => array(),
'ix' => array(array('link_app1','link_id1','link_lastmod'),array('link_app2','link_id2','link_lastmod')),
'uc' => array()
));
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.007';
return $GLOBALS['setup_info']['infolog']['currentver'];
}
$test[] = '0.9.15.007';
function infolog_upgrade0_9_15_007()
{
$GLOBALS['phpgw_setup']->oProc->RefreshTable('phpgw_infolog',array(
'fd' => array(
'info_id' => array('type' => 'auto','nullable' => False),
'info_type' => array('type' => 'varchar','precision' => '10','nullable' => False,'default' => 'task'),
'info_from' => array('type' => 'varchar','precision' => '64'),
'info_addr' => array('type' => 'varchar','precision' => '64'),
'info_subject' => array('type' => 'varchar','precision' => '64'),
'info_des' => array('type' => 'text'),
'info_owner' => array('type' => 'int','precision' => '4','nullable' => False),
'info_responsible' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_access' => array('type' => 'varchar','precision' => '10','default' => 'public'),
'info_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_datemodified' => array('type' => 'int','precision' => '4','nullable' => False),
'info_startdate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_enddate' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_id_parent' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_pri' => array('type' => 'varchar','precision' => '10','default' => 'normal'),
'info_time' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_bill_cat' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_status' => array('type' => 'varchar','precision' => '10','default' => 'done'),
'info_confirm' => array('type' => 'varchar','precision' => '10','default' => 'not'),
'info_modifier' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0'),
'info_link_id' => array('type' => 'int','precision' => '4','nullable' => False,'default' => '0')
),
'pk' => array('info_id'),
'fk' => array(),
'ix' => array(array('info_owner','info_responsible','info_status','info_startdate'),array('info_id_parent','info_owner','info_responsible','info_status','info_startdate')),
'uc' => array()
));
$GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.008';
return $GLOBALS['setup_info']['infolog']['currentver'];
}
?> ?>