Commit fd976290 authored by Juozas Kaziukenas's avatar Juozas Kaziukenas

Fixed autoincrement field detection

parent d4aab703
......@@ -40,8 +40,10 @@ class MsSqlSchemaManager extends AbstractSchemaManager
{
$dbType = strtolower($tableColumn['TYPE_NAME']);
$autoincrement = false;
if (stripos($dbType, 'identity')) {
$dbType = trim(str_ireplace('identity', '', $dbType));
$autoincrement = true;
}
$type = array();
......@@ -160,12 +162,8 @@ class MsSqlSchemaManager extends AbstractSchemaManager
'notnull' => (bool) ($tableColumn['IS_NULLABLE'] != 'YES'),
'scale' => $tableColumn['SCALE'],
'precision' => $tableColumn['PRECISION'],
'platformOptions' => array(
// @todo
'primary' => false,
'unique' => false,
'autoincrement' => false,
),
'unique' => false, // @todo
'autoincrement' => $autoincrement,
);
return new Column($tableColumn['COLUMN_NAME'], \Doctrine\DBAL\Types\Type::getType($type), $options);
......
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