mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #8903 from kinglozzer/enum-empty-defaults
FIX: prevent unnecessary field alterations for enums with empty defaults
This commit is contained in:
commit
0f4bd1606a
@ -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']) {
|
||||
|
Loading…
Reference in New Issue
Block a user