Bug Report
| Q |
A |
| BC Break |
no |
| Version |
3.7.4 |
| ORM |
3.2.0 |
| DBAL |
4.0.3 |
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:
#[ORM\Entity]
#[ORM\Table(name: 'test_entity')]
class TestEntity
{
#[ORM\Column(name: 'created_at', type: 'datetime_immutable')]
private DateTimeImmutable $createdAt;
}
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.
Bug Report
Summary
When executing
doctrine-migrations diffcommand, 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 diffdoctrine-migrations migratedoctrine-migrations diffExpected behavior
No migration generated when already in sync using the
datetime_immutabletype column.