doctrine/dbal — pull request #426 by deeky666 (2013-11-24 12:38:45+00:00)
Title: [DBAL-569] Add support for column comments / commented types in SQL Server

SQL Server has no native support for column comments. Therefore commented types are currently not supported for SQL Server leading to repeated ALTER TABLE statements by schema tool when using types that require column comments.
However there is a way to store column comments. Using SQL Server's extended properties functionality, it is possible to store metadata for columns. This is also the way SQL Server Management Studio stores "Description" property for columns.
This PR implements this to be able to use comments for columns and enable support for commented types.

The PR is not 100% finished, yet as we need to find a way to generate the correct statements in the following table alteration scenarios:

- Renamed column that also requires a comment change (either due to changed comment or change from or to a commented type that required/requires a column comment change.
- Changed column where `$columnDiff->fromColumn` is not set.

Using extended properties we need to know whether a column comment has to be added, updated or removed in order to generate the appropriate SQL statement. This is due to SQL Server having a different stored procedure for each operation. Using the wrong stored procedure leads to an error.
Therefore we always need to know the type and comment information from the column to change from in a table alteration scenario. Unfortunately we don't have that if a column is marked as renamed in the table diff or if it is marked as changed but no `$columnDiff->fromColumn` is set (this is the case in some tests actually).

Awaiting feedback how to proceed in thos scenarios.