Details
-
Type:
Improvement
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 2.1.5
-
Fix Version/s: None
-
Component/s: Schema Managers
-
Security Level: All
-
Labels:None
Description
Today have experienced problem with schema update when a custom type was removed completely from the code.
Problem was that inside the database column comment the type name was created. Still the type class couldn't be found in the code anymore. So unknownColumnType exception was raised without possibility to update or even drop the schema from doctrine command line calls.
The idea to fix this globally in DBAL would be to create UnknownType (Doctrine\DBAL\Types\Type instance) which would be returned every time unknown type is requested.
The new type should throw unknownColumnType exception each time any of it's methods is called.
Currently I have made workaround for this issue by binding the missing types to UnknownType class created inside my project so the upgrade runs smoothly for other developers as well.
Closing for issue DBAL-232 which also fixes the problem.