@@ -409,7 +409,9 @@ public function testCreateTableAndInheritDefaultCollation()
409
409
->save ();
410
410
$ this ->assertTrue ($ adapter ->hasTable ('table_with_default_collation ' ));
411
411
$ row = $ adapter ->fetchRow (sprintf ("SHOW TABLE STATUS WHERE Name = '%s' " , 'table_with_default_collation ' ));
412
- $ this ->assertEquals ('utf8_unicode_ci ' , $ row ['Collation ' ]);
412
+ // This catches legacy collations as well as the new utf8mb3_general_ci default from MySQL 8.0.30+
413
+ $ this ->assertStringStartsWith ('utf8 ' , $ row ['Collation ' ]);
414
+ $ this ->assertStringEndsWith ('_general_ci ' , $ row ['Collation ' ]);
413
415
}
414
416
415
417
public function testCreateTableWithLatin1Collate ()
@@ -772,7 +774,9 @@ public function testAddStringColumnWithCustomCollation()
772
774
$ table ->addColumn ('string_collation_default ' , 'string ' , [])->save ();
773
775
$ table ->addColumn ('string_collation_custom ' , 'string ' , ['collation ' => 'utf8mb4_unicode_ci ' ])->save ();
774
776
$ rows = $ this ->adapter ->fetchAll ('SHOW FULL COLUMNS FROM table_custom_collation ' );
775
- $ this ->assertEquals ('utf8_general_ci ' , $ rows [1 ]['Collation ' ]);
777
+ // This catches legacy collations as well as the new utf8mb3_general_ci default from MySQL 8.0.30+
778
+ $ this ->assertStringStartsWith ('utf8 ' , $ rows [1 ]['Collation ' ]);
779
+ $ this ->assertStringEndsWith ('_general_ci ' , $ rows [1 ]['Collation ' ]);
776
780
$ this ->assertEquals ('utf8mb4_unicode_ci ' , $ rows [2 ]['Collation ' ]);
777
781
}
778
782
0 commit comments