dbal
dbal copied to clipboard
MySQL table engine not changed
Bug Report
| Q | A |
|---|---|
| BC Break | no |
| Version | 3.1.3 |
Summary
The SQL for changing the MySQL table engine isn't generated if this is the only change for the table, e.g. from MyISAM to InnoDB
Current behaviour
No SQL statement for changing the MySQL table engine is generated
How to reproduce
$platform = $conn->getDatabasePlatform();
$schema = $schemaManager->createSchema();
$modifiedSchema = clone $schema;
$modifiedSchema->getTable( 'testtable' )->addOption( 'engine', 'InnoDB' );
$sql = $schema->getMigrateToSql( $modifiedSchema, $platform );
Expected behaviour
Should generate SQL statement:
ALTER TABLE testtable ENGINE=InnoDB
Fixing this bug requires the logic implemented in https://github.com/doctrine/dbal/pull/4746 regarding column SQL declarations to be implemented for table SQL declarations.
hows this going? I am still seeing a broken up() generation due to this bug
I don’t believe anybody is working on this issue.
I can try to take a closer look when I have more time, but would be awesome if someone who is more familiar with the code base could chime in
For what it is worth, my issue with collation junk populating my down() function was somehow resolved for me somewhere in the process of upgrading from Symfony 4.4 to 5.4, which updated various Doctrine dependencies. I appreciate everyone's feedback.