[DBAL-482] SQL Server Schema Manager returns incorrect value for autoincrement on IDENTITY columns Created: 03/Apr/13 Updated: 01/May/13 Resolved: 01/May/13
|Affects Version/s:||2.2, 2.3, 2.3.3|
|Reporter:||William Schaller||Assignee:||Benjamin Eberlei|
|Labels:||schematool, sqlserver, sqlsrv|
When calculating table diffs, SQLServerSchemaManager returns column definitions for identity columns with _autoincrement set to FALSE.
This causes the schema update SQL generation to pump out a
The culprit is in DBAL\Schema\SQLServerSchemaManager, starting at line 43:
When the column in question is an identity int column, the TYPE_NAME is "int identity". The second line of the snippet drops the "identity" signifier, causing the following lines that determine autoincrement to do nothing.
I simply moved the second line to below the autoincrement block ie:
This change solves this issue for me, and as far as I can tell, has no other consequences.
|Comment by Benjamin Eberlei [ 01/May/13 ]|
Fixed for 2.3.4 and was fixed for 2.4 in a different way already.