mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #5896] Pull default mapping values from concrete types #9775
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/5896
State: closed
Merged: No
This PR requires the https://github.com/doctrine/dbal/pull/2421 PR to be merged first.
It solves the problem where the comparator sees columns as changed when a custom type overrides parameters like length internally when returning the SQL statement to create/update the column.
This feature allows to supply those override values via a specific function, so the values are known to the schema tool and the comparator can compare the actual values. As an example, the following custom type always triggered the comparator to see a column as changed, even though it wasn't:
In comparison, with the new method for types introduced, one can write an equal type which will work with the comparator: