Open
Description
Bug Report
Q | A |
---|---|
Version | x.y.z |
Previous Version if the bug is a regression | x.y.z |
Summary
SQL Server
It seems that trying to change a column
E.g.
$table->getColumn('foo')->setNotnull(true);
on a column that is referenced in an index results in an error. I would assume this is also true for any constraints associated with the column as well.
Current behavior
[Doctrine\DBAL\Exception\DriverException]
An exception occurred while executing a query: SQLSTATE[42000]: [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]The index 'idx_un_sales_bm_company_category_uuid' is dependent on column 'uuid'.
Expected behavior
This can potentially be worked around by dropping all indexes and constraints, which reference the column that has to be changed and then recreating them after the ALTER TABLE ...
statement has completed.
How to reproduce
To be provided...