diff --git a/lib/Doctrine/Export/Mysql.php b/lib/Doctrine/Export/Mysql.php index 3e6876b25..3e7224c1b 100644 --- a/lib/Doctrine/Export/Mysql.php +++ b/lib/Doctrine/Export/Mysql.php @@ -518,7 +518,15 @@ class Doctrine_Export_Mysql extends Doctrine_Export } } - $default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); + // Proposed patch: + if ($field['type'] == 'enum' && $this->conn->getAttribute(Doctrine::ATTR_USE_NATIVE_ENUM)) { + $fieldType = 'varchar'; + } else { + $fieldType = $field['type']; + } + + $default = ' DEFAULT ' . $this->conn->quote($field['default'], $fieldType); + //$default = ' DEFAULT ' . $this->conn->quote($field['default'], $field['type']); } return $default; }