fix: convert empty strings to null for integer/bool columns

MySQL strict mode rejects empty string '' for integer columns like
is_internal. Convert '' and false to null before SQL insert.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 20:28:56 +00:00
parent e3a1be1844
commit ba00e7ecf6
@@ -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[] = '?';