Commit 9de41c83 authored by Mosh's avatar Mosh

Fixed #680: Missing quotation of ENUM DEFAULT Statement

parent f3e9fe66
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment