Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
index e4fb940bb2c..4637c094ef8 100644
--- a/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
+++ b/core/Command/Db/Migrations/GenerateFromSchemaFileCommand.php
@@ -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}},