Skip to content

Commit

Permalink
Merge branch '2.13.x' into 3.3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Mar 20, 2022
2 parents 6f33b11 + 21a1b63 commit 83f779b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ jobs:
- "10.0"
- "10.2"
- "10.5"
- "10.7"
extension:
- "mysqli"
- "pdo_mysql"
Expand All @@ -270,6 +271,12 @@ jobs:
- php-version: "8.1"
mariadb-version: "10.5"
extension: "pdo_mysql"
- php-version: "8.1"
mariadb-version: "10.7"
extension: "mysqli"
- php-version: "8.1"
mariadb-version: "10.7"
extension: "pdo_mysql"

services:
mariadb:
Expand Down
4 changes: 2 additions & 2 deletions tests/Functional/Schema/MySQL/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ public function testExplicitDefaultCollation(): void
public function testChangeColumnCharsetAndCollation(): void
{
[$table, $column] = $this->createCollationTable();
$column->setPlatformOption('charset', 'utf8');
$column->setPlatformOption('collation', 'utf8_bin');
$column->setPlatformOption('charset', 'latin1');
$column->setPlatformOption('collation', 'latin1_bin');

ComparatorTestUtils::assertDiffNotEmpty($this->connection, $this->comparator, $table);
}
Expand Down
14 changes: 6 additions & 8 deletions tests/Functional/Schema/MySQLSchemaManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,13 @@ public function testColumnCharset(): void
{
$table = new Table('test_column_charset');
$table->addColumn('id', 'integer');
$table->addColumn('no_charset', 'text');
$table->addColumn('foo', 'text')->setPlatformOption('charset', 'ascii');
$table->addColumn('bar', 'text')->setPlatformOption('charset', 'latin1');
$this->dropAndCreateTable($table);

$columns = $this->schemaManager->listTableColumns('test_column_charset');

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'));
}
Expand Down Expand Up @@ -275,7 +273,7 @@ public function testColumnCollation(): void
$table->addColumn('id', 'integer');
$table->addColumn('text', 'text');
$table->addColumn('foo', 'text')->setPlatformOption('collation', 'latin1_swedish_ci');
$table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8_general_ci');
$table->addColumn('bar', 'text')->setPlatformOption('collation', 'utf8mb4_general_ci');
$table->addColumn('baz', 'text')->setPlatformOption('collation', 'binary');
$this->dropAndCreateTable($table);

Expand All @@ -284,7 +282,7 @@ public function testColumnCollation(): void
self::assertArrayNotHasKey('collation', $columns['id']->getPlatformOptions());
self::assertEquals('latin1_swedish_ci', $columns['text']->getPlatformOption('collation'));
self::assertEquals('latin1_swedish_ci', $columns['foo']->getPlatformOption('collation'));
self::assertEquals('utf8_general_ci', $columns['bar']->getPlatformOption('collation'));
self::assertEquals('utf8mb4_general_ci', $columns['bar']->getPlatformOption('collation'));
self::assertInstanceOf(BlobType::class, $columns['baz']->getType());
}

Expand Down Expand Up @@ -509,9 +507,9 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void
CREATE TABLE test_table_metadata(
col1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY
)
COLLATE utf8_general_ci
COLLATE utf8mb4_general_ci
ENGINE InnoDB
ROW_FORMAT COMPRESSED
ROW_FORMAT DYNAMIC
COMMENT 'This is a test'
AUTO_INCREMENT=42
PARTITION BY HASH (col1)
Expand All @@ -521,11 +519,11 @@ public function testEnsureTableOptionsAreReflectedInMetadata(): void
$onlineTable = $this->schemaManager->listTableDetails('test_table_metadata');

self::assertEquals('InnoDB', $onlineTable->getOption('engine'));
self::assertEquals('utf8_general_ci', $onlineTable->getOption('collation'));
self::assertEquals('utf8mb4_general_ci', $onlineTable->getOption('collation'));
self::assertEquals(42, $onlineTable->getOption('autoincrement'));
self::assertEquals('This is a test', $onlineTable->getOption('comment'));
self::assertEquals([
'row_format' => 'COMPRESSED',
'row_format' => 'DYNAMIC',
'partitioned' => true,
], $onlineTable->getOption('create_options'));
}
Expand Down

0 comments on commit 83f779b

Please sign in to comment.