From 5ef86e0b16bdfb4a7502723930ee6292caa4b4be Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 24 Jul 2015 12:06:33 +0000 Subject: [PATCH] change history_status back to varchar, as it contains custom-field names, which can be non-ascii --- phpgwapi/setup/setup.inc.php | 3 ++- phpgwapi/setup/tables_current.inc.php | 2 +- phpgwapi/setup/tables_update.inc.php | 19 ++++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index 1d8a007986..4f43bc305e 100755 --- a/phpgwapi/setup/setup.inc.php +++ b/phpgwapi/setup/setup.inc.php @@ -12,7 +12,7 @@ /* Basic information about this app */ $setup_info['phpgwapi']['name'] = 'phpgwapi'; $setup_info['phpgwapi']['title'] = 'EGroupware API'; -$setup_info['phpgwapi']['version'] = '14.3'; +$setup_info['phpgwapi']['version'] = '14.3.001'; $setup_info['phpgwapi']['versions']['current_header'] = '1.29'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; @@ -73,3 +73,4 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra $setup_info['groupdav']['license'] = 'GPL'; $setup_info['groupdav']['hooks']['preferences'] = 'groupdav_hooks::menus'; $setup_info['groupdav']['hooks']['settings'] = 'groupdav_hooks::settings'; + diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index c268b05ae7..51aefca55d 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -173,7 +173,7 @@ $phpgw_baseline = array( 'history_record_id' => array('type' => 'int','precision' => '4','nullable' => False), 'history_appname' => array('type' => 'ascii','precision' => '16','nullable' => False), 'history_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False), - 'history_status' => array('type' => 'ascii','precision' => '32','nullable' => False), + 'history_status' => array('type' => 'varchar','precision' => '32','nullable' => False), 'history_new_value' => array('type' => 'text','nullable' => False), 'history_timestamp' => array('type' => 'timestamp','nullable' => False,'default' => 'current_timestamp'), 'history_old_value' => array('type' => 'text','nullable' => False), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 9f5eef5888..55f65090e6 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -375,7 +375,7 @@ function phpgwapi_upgrade14_2_013() 'nullable' => False )); $GLOBALS['egw_setup']->oProc->AlterColumn('egw_history_log','history_status',array( - 'type' => 'ascii', + 'type' => 'varchar', 'precision' => '32', 'nullable' => False )); @@ -781,3 +781,20 @@ function phpgwapi_upgrade14_2_026() return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3'; } + +/** + * Change history_status back to varchar, as it contains custom-field names, which can be non-ascii + * + * @return string + */ +function phpgwapi_upgrade14_3() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_history_log','history_status',array( + 'type' => 'varchar', + 'precision' => '32', + 'nullable' => False + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.001'; +} +