DoctrineMigrationsBundle icon indicating copy to clipboard operation
DoctrineMigrationsBundle copied to clipboard

Wrong migration for columnDefinition for DATETIME

Open Adi-18 opened this issue 2 years ago • 0 comments

doctrine/doctrine-migrations-bundle: 3.2.2

For "timestamp"-field _I have a columnDefinition:

    /**
     * @var DateTime
     *
     * @ORM\Column(name="timestamp", type="datetime", columnDefinition="DATETIME default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP")
     */
    private DateTime $timestamp;

Every time when I run make:migration I get result: $this->addSql('ALTER TABLE any_table CHANGE timestamp timestamp DATETIME default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP');

Apparently, the migration's difference comparison is not correct.

Adi-18 avatar Feb 02 '23 08:02 Adi-18