From 9c1330d292cb1bb093f3c5c7ce76c27a4a5de61f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 6 Jan 2006 05:05:20 +0000 Subject: [PATCH] fixed maximum length for directory/filename in vfs (was 255/64 now 233/100) --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_current.inc.php | 4 ++-- phpgwapi/setup/tables_update.inc.php | 23 ++++++++++++++++++++--- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index 73df9726bf..9558e6af5e 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'] = 'eGroupWare API'; - $setup_info['phpgwapi']['version'] = '1.2.003'; + $setup_info['phpgwapi']['version'] = '1.2.004'; $setup_info['phpgwapi']['versions']['current_header'] = '1.28'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -63,3 +63,4 @@ $setup_info['notifywindow']['app_order'] = 1; $setup_info['notifywindow']['tables'] = ''; $setup_info['notifywindow']['hooks'][] = 'home'; + diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index 84dca09945..a56696687c 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -327,8 +327,8 @@ 'vfs_deleteable' => array('type' => 'char','precision' => '1','default' => 'Y'), 'vfs_comment' => array('type' => 'varchar','precision' => '255'), 'vfs_app' => array('type' => 'varchar','precision' => '25'), - 'vfs_directory' => array('type' => 'varchar','precision' => '255'), - 'vfs_name' => array('type' => 'varchar','precision' => '64','nullable' => False), + 'vfs_directory' => array('type' => 'varchar','precision' => '233'), + 'vfs_name' => array('type' => 'varchar','precision' => '100','nullable' => False), 'vfs_link_directory' => array('type' => 'varchar','precision' => '255'), 'vfs_link_name' => array('type' => 'varchar','precision' => '128'), 'vfs_version' => array('type' => 'varchar','precision' => '30','nullable' => False,'default' => '0.0.0.0'), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index c70ff859b8..4b7296c2f8 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -10,7 +10,6 @@ \**************************************************************************/ // $Id$ - // $Source$ /* Include older eGroupWare update support */ include('tables_update_0_9_9.inc.php'); @@ -1068,6 +1067,24 @@ 'nullable' => False )); - $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.2.003'; - return $GLOBALS['setup_info']['phpgwapi']['currentver']; + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.2.003'; } + + $test[] = '1.2.003'; + function phpgwapi_upgrade1_2_003() + { + // change lenght of dir/name from 255/64 to 233/100, as 64 was definitly to short, + // sum has to be <= 333 (1000/3) because of the mysql index restrictions + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_vfs','vfs_directory',array( + 'type' => 'varchar', + 'precision' => '233' + )); + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_vfs','vfs_name',array( + 'type' => 'varchar', + 'precision' => '100', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '1.2.004'; + } +?>