Fixed #680: Missing quotation of ENUM DEFAULT Statement
This commit is contained in:
parent
f3e9fe66a8
commit
9de41c83d1
@ -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;
|
return $default;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user