Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong migration for columnDefinition for DATETIME #487

Open
Adi-18 opened this issue Feb 2, 2023 · 0 comments
Open

Wrong migration for columnDefinition for DATETIME #487

Adi-18 opened this issue Feb 2, 2023 · 0 comments

Comments

@Adi-18
Copy link

Adi-18 commented Feb 2, 2023

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 Adi-18 changed the title Wrong migration for columnDefinition in datetime Wrong migration for columnDefinition for DATETIME Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant