Skip to content
Snippets Groups Projects
Unverified Commit 80027792 authored by Maxence Lange's avatar Maxence Lange Committed by Joas Schilling
Browse files

add support for boolean default


Signed-off-by: default avatarMaxence Lange <maxence@artificial-owl.com>
code cleaning

Signed-off-by: default avatarMaxence Lange <maxence@artificial-owl.com>
code cleaning

Signed-off-by: default avatarMaxence Lange <maxence@artificial-owl.com>
parent 8593edd6
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,11 @@ EOT
}
$default = $column->getDefault();
if ($default !== null) {
$default = is_numeric($default) ? $default : "'$default'";
if (is_string($default)) {
$default = "'$default'";
} else if (is_bool($default)) {
$default = ($default === true) ? 'true' : 'false';
}
$content .= str_replace('{{default}}', $default, <<<'EOT'
'default' => {{default}},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment