From f84cf5903354db109f23f846feaa9944997f9491 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Sat, 10 Sep 2022 12:59:21 -0700 Subject: [PATCH] Remove leftovers of handling foreign keys on non-InnoDB engines for MySQL --- src/Platforms/AbstractMySQLPlatform.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/Platforms/AbstractMySQLPlatform.php b/src/Platforms/AbstractMySQLPlatform.php index a62e07651c5..940561aaf07 100644 --- a/src/Platforms/AbstractMySQLPlatform.php +++ b/src/Platforms/AbstractMySQLPlatform.php @@ -25,8 +25,6 @@ use function is_numeric; use function sprintf; use function str_replace; -use function strtoupper; -use function trim; /** * Provides the base implementation for the lowest versions of supported MySQL-like database platforms. @@ -253,7 +251,6 @@ protected function _getCreateTableSQL(string $name, array $columns, array $optio $sql = [implode(' ', $sql)]; - // Propagate foreign key constraints only for InnoDB. if (isset($options['foreignKeys'])) { foreach ($options['foreignKeys'] as $definition) { $sql[] = $this->getCreateForeignKeySQL($definition, $name); @@ -440,19 +437,6 @@ protected function getPreAlterTableIndexForeignKeySQL(TableDiff $diff): array } } - $engine = 'INNODB'; - - if ($diff->fromTable instanceof Table && $diff->fromTable->hasOption('engine')) { - $engine = strtoupper(trim($diff->fromTable->getOption('engine'))); - } - - // Suppress foreign key constraint propagation on non-supporting engines. - if ($engine !== 'INNODB') { - $diff->addedForeignKeys = []; - $diff->changedForeignKeys = []; - $diff->removedForeignKeys = []; - } - return array_merge( $sql, $this->getPreAlterTableAlterIndexForeignKeySQL($diff),