1
0
mirror of synced 2024-12-14 07:06:04 +03:00

fix for mysql export module (allow specifying a default without specifying a length)

This commit is contained in:
romanb 2007-10-19 11:13:49 +00:00
parent f1c6657c0f
commit 9b4f5db135

View File

@ -500,7 +500,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
public function getDefaultFieldDeclaration($field) public function getDefaultFieldDeclaration($field)
{ {
$default = ''; $default = '';
if (isset($field['default']) && $field['length'] <= 255) { if (isset($field['default']) && ( ! isset($field['length']) || $field['length'] <= 255)) {
if ($field['default'] === '') { if ($field['default'] === '') {
$field['default'] = empty($field['notnull']) $field['default'] = empty($field['notnull'])
? null : $this->valid_default_values[$field['type']]; ? null : $this->valid_default_values[$field['type']];