Skip to content

Commit cc64db9

Browse files
committed
fix: patch up schema column params
1 parent 7648291 commit cc64db9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Schema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,11 +471,11 @@ protected static function createColumn($table, $columnName, $columnValue)
471471
if ($columnValue['type'] === 'string' || $columnValue['type'] === 'char' || $columnValue['type'] === 'text') {
472472
$returnedColumn = $table->{$columnValue['type']}(
473473
$columnName,
474-
$columnValue['length']
474+
$columnValue['length'] ?? null
475475
);
476476

477477
unset($columnValue['length']);
478-
} else if ($columnName['type'] === 'enum' || $columnName['type'] === 'set') {
478+
} else if ($columnValue['type'] === 'enum' || $columnValue['type'] === 'set') {
479479
$returnedColumn = $table->{$columnValue['type']}(
480480
$columnName,
481481
$columnValue['values'] ?? []

0 commit comments

Comments
 (0)