From aac0a279fb3e86c304b9761e0a5e02af5d4bdf3a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 4 Aug 2015 15:11:19 +0000 Subject: [PATCH] shorten all history_appname/history_status entries to 16/32 chars, to not stall update for PostgreSQL --- phpgwapi/setup/tables_update.inc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 53bf811c62..5f3a5a78f2 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -376,6 +376,12 @@ function phpgwapi_upgrade14_2_012() function phpgwapi_upgrade14_2_013() { + // shorten all history_appname/history_status entries to 16/32 chars, to not stall update for PostgreSQL + $GLOBALS['egw_setup']->db->update('egw_history_log', array( + 'history_appname=SUBSTRING(history_appname FROM 1 FOR 16)', + 'history_status=SUBSTRING(history_status FROM 1 FOR 32)', + ), 'LENGTH(history_appname) > 16 OR LENGTH(history_status) > 32', __LINE__, __FILE__); + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_history_log','history_appname',array( 'type' => 'ascii', 'precision' => '16',