dbal
dbal copied to clipboard
Deprecate dropping columns referenced by constraints
Q | A |
---|---|
Type | deprecation |
Summary
Currently, it is impossible to reference a non-existing column in a constraint being added but it's possible to drop the column afterwards, which will leave the table in an invalid state.
The order of operations in the following test will have to be changed once this deprecation is promoted to exception: https://github.com/doctrine/dbal/blob/33f5589058e803f9757b50a032df0301efc4908d/tests/Schema/TableTest.php#L823-L825
The following is out of scope of this PR:
- Renaming the column being renamed in referencing indexes and constraints.
- Dropping the column being dropped from referencing indexes and dropping the eventually empty indexes.