Commit 9a93bf7a authored by Kim Hemsø Rasmussen's avatar Kim Hemsø Rasmussen

Added autoincrement support

parent 5773cf08
......@@ -147,7 +147,7 @@ class DrizzlePlatform extends AbstractPlatform
$database = 'DATABASE()';
}
return "SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_COMMENT, IS_NULLABLE" .
return "SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_COMMENT, IS_NULLABLE, IS_AUTO_INCREMENT" .
" FROM DATA_DICTIONARY.COLUMNS" .
" WHERE TABLE_SCHEMA=" . $database . " AND TABLE_NAME = '" . $table . "'";
}
......@@ -162,4 +162,13 @@ class DrizzlePlatform extends AbstractPlatform
return "SELECT * FROM DATA_DICTIONARY.INDEXES WHERE FALSE";
}
public function prefersIdentityColumns()
{
return true;
}
public function supportsIdentityColumns()
{
return true;
}
}
......@@ -33,7 +33,9 @@ class DrizzleSchemaManager extends AbstractSchemaManager
$type = $this->_platform->getDoctrineTypeMapping($dbType);
$type = $this->extractDoctrineTypeFromComment($tableColumn['COLUMN_COMMENT'], $type);
$options = array();
$options = array(
'autoincrement' => (boolean)$tableColumn['IS_AUTO_INCREMENT'],
);
return new Column($tableName, \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