From 5188c0a6a3a817a6bb5176e65f0b057d36aba008 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 2 Jul 2004 22:25:26 +0000 Subject: [PATCH] updating the missed sequenzes (postgres) and pushing all versions to 1.0.0 --- infolog/setup/setup.inc.php | 4 ++-- infolog/setup/tables_update.inc.php | 15 ++++++++++++++- phpgwapi/setup/setup.inc.php | 4 ++-- phpgwapi/setup/tables_update.inc.php | 26 +++++++++++++++++++++++++- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/infolog/setup/setup.inc.php b/infolog/setup/setup.inc.php index f1538a93eb..ffc7f97cc7 100755 --- a/infolog/setup/setup.inc.php +++ b/infolog/setup/setup.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ $setup_info['infolog']['name'] = 'infolog'; - $setup_info['infolog']['version'] = '0.9.15.008'; + $setup_info['infolog']['version'] = '1.0.0'; $setup_info['infolog']['app_order'] = 5; $setup_info['infolog']['tables'] = array('phpgw_infolog','phpgw_links','phpgw_infolog_extra'); $setup_info['infolog']['enable'] = 1; @@ -63,7 +63,7 @@ /* Dependencies for this app to work */ $setup_info['infolog']['depends'][] = array( 'appname' => 'phpgwapi', - 'versions' => Array('0.9.14','0.9.15','0.9.16','1.0.00') + 'versions' => Array('0.9.14','0.9.15','0.9.16','1.0.0') ); $setup_info['infolog']['depends'][] = array( 'appname' => 'etemplate', diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php index 22ce24884f..31b9042228 100644 --- a/infolog/setup/tables_update.inc.php +++ b/infolog/setup/tables_update.inc.php @@ -320,8 +320,21 @@ '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() )); + + // we dont need to do update 0.9.15.008, as UpdateSequenze is called now by RefreshTable + $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0'; + return $GLOBALS['setup_info']['infolog']['currentver']; + } - $GLOBALS['setup_info']['infolog']['currentver'] = '0.9.15.008'; + + $test[] = '0.9.15.008'; + function infolog_upgrade0_9_15_008() + { + // update the sequenzes for refreshed tables (postgres only) + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_infolog','info_id'); + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_links','link_id'); + + $GLOBALS['setup_info']['infolog']['currentver'] = '1.0.0'; return $GLOBALS['setup_info']['infolog']['currentver']; } ?> diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index ce6956e7c0..a484b521d6 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -14,7 +14,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'phpgwapi'; - $setup_info['phpgwapi']['version'] = '0.9.99.026'; + $setup_info['phpgwapi']['version'] = '1.0.0'; $setup_info['phpgwapi']['versions']['current_header'] = '1.27'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -45,7 +45,7 @@ /* Basic information about this app */ $setup_info['notifywindow']['name'] = 'notifywindow'; $setup_info['notifywindow']['title'] = 'Notify Window'; - $setup_info['notifywindow']['version'] = '0.9.13.002'; + $setup_info['notifywindow']['version'] = '1.0.0'; $setup_info['notifywindow']['enable'] = 2; $setup_info['notifywindow']['app_order'] = 1; $setup_info['notifywindow']['tables'] = ''; diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index ddccd096e4..47a3e5d8b5 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -1268,6 +1268,14 @@ $test[] = '0.9.99.024'; function phpgwapi_upgrade0_9_99_024() { +/* + $sql = "SELECT ae1.contact_id,ae1.contact_name,ae1.contact_value,ae2.contact_value FROM phpgw_addressbook_extra ae1 LEFT JOIN phpgw_addressbook_extra ae2 ON ae1.contact_id==ae2.contact_id AND ae1.contact_name == ae2.contact_name WHERE ae1.contact_value != ae2.contact_vaue"; + $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__); + while ($GLOBALS['phpgw_setup']->oProc->next_record()) + { + + } +*/ $GLOBALS['phpgw_setup']->oProc->RefreshTable('phpgw_addressbook_extra',array( 'fd' => array( 'contact_id' => array('type' => 'int','precision' => '4','nullable' => False), @@ -1351,7 +1359,23 @@ 'uc' => array() )); - $GLOBALS['setup_info']['phpgwapi']['currentver'] = '0.9.99.026'; + // we dont need to do update 0.9.99.026, as UpdateSequenze is called now by RefreshTable + $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0'; return $GLOBALS['setup_info']['phpgwapi']['currentver']; } + + + $test[] = '0.9.99.026'; + function phpgwapi_upgrade0_9_99_026() + { + // update the sequenzes for refreshed tables (postgres only) + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_categories','cat_id'); + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_applications','app_id'); + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_history_log','history_id'); + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_vfs','file_id'); + $GLOBALS['phpgw_setup']->oProc->UpdateSequence('phpgw_addressbook','id'); + + $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.0.0'; + return $GLOBALS['setup_info']['calendar']['currentver']; + } ?>