Skip to content

Commit

Permalink
Merge pull request #276 from bowphp/papac-patch-1
Browse files Browse the repository at this point in the history
Update MysqlCompose.php
  • Loading branch information
papac authored Oct 29, 2023
2 parents 9b41fa2 + 1dcab5c commit 2541cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Database/Migration/Compose/MysqlCompose.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 2541cca

Please sign in to comment.