diff --git a/files/custom/Espo/Modules/DataMigration/Services/EntityImporter.php b/files/custom/Espo/Modules/DataMigration/Services/EntityImporter.php index 9645bba..5bd0a3d 100644 --- a/files/custom/Espo/Modules/DataMigration/Services/EntityImporter.php +++ b/files/custom/Espo/Modules/DataMigration/Services/EntityImporter.php @@ -348,6 +348,11 @@ class EntityImporter $value = json_encode($value, JSON_UNESCAPED_UNICODE); } + // Fix empty strings for integer/bool columns (MySQL strict mode) + if ($value === '' || $value === false) { + $value = null; + } + $columns[] = "`{$column}`"; $values[] = $value; $placeholders[] = '?';