mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°2490 Setup/toolkit : no longer generates useless ALTER TABLE queries on MariaDB >= 10.2
* case insensitive SQL data type comparison * some options have also case differences (example 'int(11) unsigned') * DEFAULT 'NULL' added by MariaDB on all nullable fields * default values are always surrounded with single quotes on MariaDB This is a Combodo implementation of PR #91
This commit is contained in:
@@ -5514,7 +5514,7 @@ abstract class MetaModel
|
||||
//
|
||||
$bToBeChanged = false;
|
||||
$sActualFieldSpec = CMDBSource::GetFieldSpec($sTable, $sField);
|
||||
if (strcasecmp($sDBFieldSpec, $sActualFieldSpec) != 0)
|
||||
if (!CMDBSource::IsSameFieldTypes($sDBFieldSpec, $sActualFieldSpec))
|
||||
{
|
||||
$bToBeChanged = true;
|
||||
$aErrors[$sClass][$sAttCode][] = "field '$sField' in table '$sTable' has a wrong type: found '$sActualFieldSpec' while expecting '$sDBFieldSpec'";
|
||||
|
||||
Reference in New Issue
Block a user