Commit 85299543 authored by samw3's avatar samw3

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

parent 93e19451
......@@ -441,6 +441,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
*/
public function getIntegerDeclaration($name, $field)
{
var_dump($field);
$default = $autoinc = '';
if ( ! empty($field['autoincrement'])) {
$autoinc = ' AUTO_INCREMENT';
......@@ -448,8 +449,12 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
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']);
}
}
/**
elseif (empty($field['notnull'])) {
$default = ' DEFAULT NULL';
......
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