From 1dcab5c6b2dc30123a294680553ca019540b87bf Mon Sep 17 00:00:00 2001 From: Franck DAKIA Date: Sun, 29 Oct 2023 00:24:30 +0000 Subject: [PATCH] Update MysqlCompose.php --- src/Database/Migration/Compose/MysqlCompose.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); }