Commit 729a47bd authored by 王源's avatar 王源 🎧

修改字段为timestamp类型,不填写默认值

parent cc46c4ad
...@@ -1138,7 +1138,9 @@ class MakeModelCommand extends HyperfCommand ...@@ -1138,7 +1138,9 @@ class MakeModelCommand extends HyperfCommand
$t .= "->nullable()"; $t .= "->nullable()";
} }
if (($default && $default !== '') || $default === '0') { if (($default && $default !== '') || $default === '0') {
$t .= "->default('$default')"; if ($type !== 'timestamp') {
$t .= "->default('$default')";
}
} }
if ($collation) { if ($collation) {
$t .= "->collation('$collation')"; $t .= "->collation('$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