I am trying to use PostgreSQL (9.3+) domains with Doctrine custom types.
The problem is Doctrine diff tool loads the type "under" the domain, which doesn't match the column definition in Entity (which uses the domain name) and generates (over and over) wrong migrations.
Create a domain inside PG database (with name different from existing types, beware of schema prefix), then create a custom doctrine type that uses it.
Create an entity with field with this type
Generate schema
Generate migration
Execute migration
Generate migration (output is same as the previous, already executed migration)
Expected behavior
When a custom type with same name as a domain exists, differ should generate SQL with the domain name, not the type "under" the domain.
Summary
I am trying to use PostgreSQL (9.3+) domains with Doctrine custom types.
The problem is Doctrine diff tool loads the type "under" the domain, which doesn't match the column definition in Entity (which uses the domain name) and generates (over and over) wrong migrations.
I suspect this behavior is related to https://github.com/doctrine/dbal/issues/1383
How to reproduce
Full example at the end of the issue.
Expected behavior
When a custom type with same name as a domain exists, differ should generate SQL with the domain name, not the type "under" the domain.
Full example
Full example: For example email: