dbal icon indicating copy to clipboard operation
dbal copied to clipboard

MySQL table engine not changed

Open aimeos opened this issue 4 years ago • 5 comments

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

aimeos avatar Nov 02 '21 11:11 aimeos

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.

morozov avatar Nov 02 '21 16:11 morozov

hows this going? I am still seeing a broken up() generation due to this bug

arderyp avatar Feb 20 '22 07:02 arderyp

I don’t believe anybody is working on this issue.

morozov avatar Feb 20 '22 15:02 morozov

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

arderyp avatar Feb 20 '22 16:02 arderyp

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.

arderyp avatar Jul 15 '22 02:07 arderyp