doctrine/DoctrineMigrationsBundle

Generated migrations do not consider `columnDefinition=...` clause

Closed this issue · 2 comments

doctrine/doctrine-migrations-bundle 3.3.1

The content of columnDefinition=... is not part of the generated migration.

For instance:

 #[ORM\Column(
    type: 'string',
    length: 255,

    // custom column definition content here...
    columnDefinition: "VARCHAR(255) UNIQUE")
]
private string $lastName;

When using the doctrine:migrations:diff or doctrine:migrations:migrate, the generated migration does not contain the custom column definition. According to the documentation here, this custom setting should be set in the migration.

stof commented

This bundle is not responsible for the content of migrations. The SQL queries are generated by doctrine/dbal. I suggest you to report it there so that the DBAL maintainers can investigate this

Alright, sorry for that, I post this on dbal then.