diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php index 81a196d3af..288f90b435 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.904'; +$setup_info['phpgwapi']['version'] = '14.3.905'; $setup_info['phpgwapi']['versions']['current_header'] = '1.29'; $setup_info['phpgwapi']['enable'] = 3; $setup_info['phpgwapi']['app_order'] = 1; diff --git a/phpgwapi/setup/tables_current.inc.php b/phpgwapi/setup/tables_current.inc.php index b078e4a2e6..6d9a96a224 100644 --- a/phpgwapi/setup/tables_current.inc.php +++ b/phpgwapi/setup/tables_current.inc.php @@ -190,7 +190,7 @@ $phpgw_baseline = array( 'async_next' => array('type' => 'int','meta' => 'timestamp','precision' => '4','nullable' => False,'comment' => 'timestamp of next run'), 'async_times' => array('type' => 'ascii','precision' => '255','nullable' => False,'comment' => 'serialized array with values for keys hour,min,day,month,year'), 'async_method' => array('type' => 'ascii','precision' => '80','nullable' => False,'comment' => 'app.class.method class::method to execute'), - 'async_data' => array('type' => 'ascii','precision' => '8192','nullable' => False,'comment' => 'serialized array with data to pass to method'), + 'async_data' => array('type' => 'varchar','precision' => '8192','nullable' => False,'comment' => 'serialized array with data to pass to method'), 'async_account_id' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'default' => '0','comment' => 'creator of job'), 'async_auto_id' => array('type' => 'auto','nullable' => False) ), diff --git a/phpgwapi/setup/tables_update.inc.php b/phpgwapi/setup/tables_update.inc.php index 3d02ceb9c1..a2a9cc4c4a 100644 --- a/phpgwapi/setup/tables_update.inc.php +++ b/phpgwapi/setup/tables_update.inc.php @@ -896,6 +896,25 @@ function phpgwapi_upgrade14_3_004() return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.005'; } +/** + * Change egw_async.async_data back to varchar, as it can contain utf-8 data + * + * @return string + */ +function phpgwapi_upgrade14_3_005() +{ + $GLOBALS['run-from-upgrade14_3_005'] = true; + + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_async','async_data',array( + 'type' => 'varchar', + 'precision' => '8192', + 'nullable' => False, + 'comment' => 'serialized array with data to pass to method' + )); + + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.006'; +} + /** * Updates on the way to 15.1 */ @@ -905,7 +924,7 @@ function phpgwapi_upgrade14_3_004() * * @return string */ -function phpgwapi_upgrade14_3_005() +function phpgwapi_upgrade14_3_006() { $GLOBALS['egw_setup']->oProc->DropTable('egw_api_content_history'); @@ -969,3 +988,15 @@ function phpgwapi_upgrade14_3_903() } return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.904'; } + +/** + * Run 14.3.005 upgrade for everyone who was already on 14.3.9xx + */ +function phpgwapi_upgrade14_3_904() +{ + if (empty($GLOBALS['run-from-upgrade14_3_005'])) + { + phpgwapi_upgrade14_3_005(); + } + return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.905'; +}