We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21cee19 commit c9f214dCopy full SHA for c9f214d
1 file changed
src/Phinx/Db/Adapter/MysqlAdapter.php
@@ -1355,7 +1355,7 @@ protected function getColumnSqlDefinition(Column $column): string
1355
$sqlType = $this->getSqlType($column->getType(), $column->getLimit());
1356
$def = strtoupper($sqlType['name']);
1357
}
1358
- if ($column->getPrecision() && $column->getScale()) {
+ if ($column->getPrecision() && $column->getScale() !== null) {
1359
$def .= '(' . $column->getPrecision() . ',' . $column->getScale() . ')';
1360
} elseif (isset($sqlType['limit'])) {
1361
$def .= '(' . $sqlType['limit'] . ')';
0 commit comments