I am investigating an issue with custom EnumType definition in MySQL.
I have defined an EnumType following Doctrine predicates quite some time ago; now that I upgraded to the last version of ORM. When I try to upgrade the database, I get a different db schema.
The ALTER line rendered is the following:
ALTER TABLE extensionAbstract CHANGE action action ENUM('ACTION_DELETE', 'ACTION_INSERT', 'ACTION_UPDATE') NOT NULL COMMENT 'ENUM(ACTION_DELETE, ACTION_INSERT, ACTION_UPDATE)';
I am suspecting the change might be due to some modification in ./vendor/doctrine/dbal/src/Schema/MySQLSchemaManager.php; the following line has been modified.
// In cases where not connected to a database DESCRIBE $table does not return 'Comment'
if (isset($tableColumn['comment'])) {
$type = $this->extractDoctrineTypeFromComment($tableColumn['comment'], $type);
$tableColumn['comment'] = $this->removeDoctrineTypeFromComment($tableColumn['comment'], $type);
}
How to fix it ?
Expected behavior
Looking at the expected behavior from earlier version, I get should get: #_type: Base\Enum\EntityAction^ {#476} in the db schema, but it returns stringType
Bug Report
Summary
I am investigating an issue with custom EnumType definition in MySQL. I have defined an EnumType following Doctrine predicates quite some time ago; now that I upgraded to the last version of ORM. When I try to upgrade the database, I get a different db schema.
Current behavior
The ALTER line rendered is the following:
ALTER TABLE extensionAbstract CHANGE action action ENUM('ACTION_DELETE', 'ACTION_INSERT', 'ACTION_UPDATE') NOT NULL COMMENT 'ENUM(ACTION_DELETE, ACTION_INSERT, ACTION_UPDATE)';
I am suspecting the change might be due to some modification in
./vendor/doctrine/dbal/src/Schema/MySQLSchemaManager.php
; the following line has been modified.How to fix it ?
Expected behavior
Looking at the expected behavior from earlier version, I get should get:
#_type: Base\Enum\EntityAction^ {#476}
in the db schema, but it returns stringType