Merge pull request #8903 from kinglozzer/enum-empty-defaults

FIX: prevent unnecessary field alterations for enums with empty defaults
This commit is contained in:
Guy Marriott 2019-04-06 09:48:57 +13:00 committed by GitHub
commit 0f4bd1606a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,7 +284,7 @@ class MySQLSchemaManager extends DBSchemaManager
$fieldSpec .= " character set $collInfo[Charset] collate $field[Collation]";
}
if ($field['Default'] || $field['Default'] === "0") {
if ($field['Default'] || $field['Default'] === "0" || $field['Default'] === '') {
$fieldSpec .= " default " . $this->database->quoteString($field['Default']);
}
if ($field['Extra']) {