Commit 01480787 authored by runa's avatar runa

detect autoincrement columns

parent 2704af64
...@@ -332,6 +332,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict { ...@@ -332,6 +332,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict {
'primary' => (strtolower($val['key']) == 'pri'), 'primary' => (strtolower($val['key']) == 'pri'),
'default' => $val['default'], 'default' => $val['default'],
'notnull' => (bool) ($val['null'] != 'YES'), 'notnull' => (bool) ($val['null'] != 'YES'),
'autoinc' => (bool) (strpos($val['extra'],"auto_increment") > -1),
); );
$columns[$val['field']] = new Doctrine_Schema_Column($description); $columns[$val['field']] = new Doctrine_Schema_Column($description);
} }
......
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