diff --git a/src/Database/Migration/Compose/MysqlCompose.php b/src/Database/Migration/Compose/MysqlCompose.php index a1dd8d95..3773bfe2 100644 --- a/src/Database/Migration/Compose/MysqlCompose.php +++ b/src/Database/Migration/Compose/MysqlCompose.php @@ -48,13 +48,13 @@ private function composeAddMysqlColumn(string $name, array $description): string } // Set the size - if ($size) { + if (is_numeric($size)) { $type = sprintf('%s(%s)', $type, $size); } // Add column size if (in_array($raw_type, ['ENUM', 'CHECK'])) { - $check = (array) $check; + $check = (array) $size; $check = "'" . implode("', '", $check) . "'"; $type = sprintf('%s(%s)', $type, $check); }