When executing doctrine-migrations diff command, it generates a migration even though the entity and the database correspond to each other on datetime_immutable defined field.
Current behavior
Diff command generates unnecessary migration over and over again when already in sync:
$this->addSql('ALTER TABLE test_entity ALTER created_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
If I change the entity column type to 'datetime' instead of 'datetime_immutable' then it works properly, but I need to use the immutable type.
Bug Report
Summary
When executing
doctrine-migrations diff
command, it generates a migration even though the entity and the database correspond to each other on datetime_immutable defined field.Current behavior
Diff command generates unnecessary migration over and over again when already in sync:
$this->addSql('ALTER TABLE test_entity ALTER created_at TYPE TIMESTAMP(0) WITHOUT TIME ZONE');
If I change the entity column type to
'datetime'
instead of'datetime_immutable'
then it works properly, but I need to use the immutable type.How to reproduce
Entity definition:
Execute:
doctrine-migrations diff
doctrine-migrations migrate
doctrine-migrations diff
Expected behavior
No migration generated when already in sync using the
datetime_immutable
type column.