Skip to content

Commit fa4bb41

Browse files
committed
fix logic for mysql
Signed-off-by: Matthew Peveler <matt.peveler@gmail.com>
1 parent 53941e4 commit fa4bb41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Phinx/Db/Adapter/MysqlAdapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,8 +1364,8 @@ protected function getColumnSqlDefinition(Column $column): string
13641364
}
13651365
if ($column->getPrecision() && $column->getScale() !== null) {
13661366
$def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
1367-
} elseif ($column->getLimit() || (!$column->hasLimitSet() && isset($sqlType['limit']))) {
1368-
$def .= '(' . ($column->getLimit() ?: $sqlType['limit']) . ')';
1367+
} elseif (($column->getLimit() !== null || !$column->hasLimitSet()) && isset($sqlType['limit'])) {
1368+
$def .= '(' . $sqlType['limit'] . ')';
13691369
}
13701370

13711371
$values = $column->getValues();

0 commit comments

Comments
 (0)