mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
some fixes to get update from ancient EGroupware 1.4 working again
This commit is contained in:
parent
5d4fdd67c6
commit
cf5781d283
@ -822,6 +822,7 @@ class Db
|
||||
if (in_array($e->getCode(), [
|
||||
1064, // You have an error in your SQL syntax
|
||||
1062, // Duplicate entry
|
||||
1054, // Unknown column 'X' in 'field list'
|
||||
]))
|
||||
{
|
||||
throw new Db\Exception\InvalidSql($e->getMessage(), $e->getCode(), $e);
|
||||
|
@ -1164,6 +1164,12 @@ class Schema
|
||||
}
|
||||
break;
|
||||
case 'decimal':
|
||||
// some old and broken backups have that for timestamps, as it's invalid anyway (scale < 0), we translate it to timestamp
|
||||
if ($col_data['precision'] === -1 && empty($col_data['scale']))
|
||||
{
|
||||
$ado_col = 'T';
|
||||
break;
|
||||
}
|
||||
$ado_col = "N($col_data[precision].$col_data[scale])";
|
||||
break;
|
||||
case 'double':
|
||||
|
@ -536,7 +536,7 @@ class setup
|
||||
'app_name' => $appname,
|
||||
], __LINE__, __FILE__);
|
||||
}
|
||||
catch (Api\Db\Exception\InvalidSql $e)
|
||||
catch (Api\Db\Exception $e)
|
||||
{
|
||||
// ease update from pre 1.6 eg. 1.4 not having app_index, app_icon, app_icon_app columns
|
||||
_egw_log_exception($e);
|
||||
|
Loading…
Reference in New Issue
Block a user