diff --git a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index 006f2e5778e..85b5b5c4734 100644 --- a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -192,11 +192,6 @@ protected function _getPortableTableColumnDefinition($tableColumn) $column = new Column($tableColumn['field'], Type::getType($type), $options); - /** - * The key 'characterset' in $tableColumn is from MySql platform implementation - * - * @see MySqlPlatform::getListTableColumnsSQL() - */ if (isset($tableColumn['characterset'])) { $column->setPlatformOption('charset', $tableColumn['characterset']); } diff --git a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php index 45354297809..e48b28717ca 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Schema/MySqlSchemaManagerTest.php @@ -212,7 +212,7 @@ public function testColumnCharset() $columns = $this->schemaManager->listTableColumns('test_column_charset'); - self::assertArrayNotHasKey('collation', $columns['id']->getPlatformOptions()); + self::assertFalse($columns['id']->hasPlatformOption('charset')); self::assertEquals('utf8', $columns['no_charset']->getPlatformOption('charset')); self::assertEquals('ascii', $columns['foo']->getPlatformOption('charset')); self::assertEquals('latin1', $columns['bar']->getPlatformOption('charset')); diff --git a/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php b/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php index bf4e5e2406a..6dec263df34 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/AbstractMySQLPlatformTestCase.php @@ -913,19 +913,6 @@ public function testColumnCharsetDeclarationSQL() : void ); } - public function testGetCreateTableSQLWithColumnCharset() : void - { - $table = new Table('test_column_charset'); - $table->addColumn('no_charset', 'string'); - $table->addColumn('column_charset', 'string')->setPlatformOption('charset', 'ascii'); - - self::assertSame( - ['CREATE TABLE test_column_charset (no_charset VARCHAR(255) NOT NULL, column_charset VARCHAR(255) CHARACTER SET ascii NOT NULL) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB'], - $this->platform->getCreateTableSQL($table), - 'Column "no_charset" will use the default charset from the table/database and "column_charset" overwrites the charset on this column' - ); - } - public function testSupportsColumnCollation() : void { self::assertTrue($this->platform->supportsColumnCollation());