mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #12969 from nextcloud/db-migration-boolean-default
add support for boolean default
This commit is contained in:
commit
b8bb1d491f
1 changed files with 5 additions and 1 deletions
|
|
@ -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}},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue