Commit aa5e9f8e authored by 王源's avatar 王源 🎧

修复数据库默认数据bug

parent 40c86f0c
......@@ -955,7 +955,7 @@ class MakeModelCommand extends HyperfCommand
if ($null == 'YES') {
$t .= "->nullable()";
}
if ($default) {
if ($default || $default === '0') {
$t .= "->default('$default')";
}
if ($collation) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment