diff --git a/lib/Doctrine/DataDict/Mysql.php b/lib/Doctrine/DataDict/Mysql.php index 830ec2e2a..a35c253d9 100644 --- a/lib/Doctrine/DataDict/Mysql.php +++ b/lib/Doctrine/DataDict/Mysql.php @@ -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'])) {