Commit 85299543 authored by samw3's avatar samw3

changed getIntegerDeclaration() to handle $field['default']==NULL condition

parent 93e19451
......@@ -440,15 +440,20 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
* declare the specified field.
*/
public function getIntegerDeclaration($name, $field)
{
{
var_dump($field);
$default = $autoinc = '';
if ( ! empty($field['autoincrement'])) {
$autoinc = ' AUTO_INCREMENT';
} elseif (array_key_exists('default', $field)) {
if ($field['default'] === '') {
$field['default'] = empty($field['notnull']) ? null : 0;
}
if (is_null($field['default'])) {
$default = ' DEFAULT NULL';
} else {
$default = ' DEFAULT '.$this->conn->quote($field['default']);
}
$default = ' DEFAULT '.$this->conn->quote($field['default']);
}
/**
elseif (empty($field['notnull'])) {
......
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