You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working a little with custom types in Doctrine lately, I recently noticed a bug in the Comparator, although its roots are deeper down. Consider having a custom type like this:
Now, when using that type in an entity, at first when generating the database SQL and inserting it, everything is fine. The column has the correct type (binary, fixed 16) and a comment denoting the "CustomType" type.
The problem now is when asking the schema-tool for a diff. Even though the column using that type wasn't changed, the schema-tool suggests an ALTER TABLE statement, changing the column to exactly what it already is.
I looked a bit into this, and it seems that the problem is that the Schema generated from the mapping files does not include the columns comment, length, fixed status and also that the type in the Schema coming from the DB has Binary as type, instead of CustomType. This lets the Comparator think it needs to update the column.
This problem looks rather complex to me, and I have no real idea on how to solve this, maybe someone else who has a better insight can analyse this further.
The text was updated successfully, but these errors were encountered:
While working a little with custom types in Doctrine lately, I recently noticed a bug in the
Comparator
, although its roots are deeper down. Consider having a custom type like this:Now, when using that type in an entity, at first when generating the database SQL and inserting it, everything is fine. The column has the correct type (binary, fixed 16) and a comment denoting the "CustomType" type.
The problem now is when asking the schema-tool for a diff. Even though the column using that type wasn't changed, the schema-tool suggests an ALTER TABLE statement, changing the column to exactly what it already is.
I looked a bit into this, and it seems that the problem is that the
Schema
generated from the mapping files does not include the columns comment, length, fixed status and also that the type in theSchema
coming from the DB hasBinary
as type, instead ofCustomType
. This lets theComparator
think it needs to update the column.This problem looks rather complex to me, and I have no real idea on how to solve this, maybe someone else who has a better insight can analyse this further.
The text was updated successfully, but these errors were encountered: