Skip to content

Commit

Permalink
Fix new database default character set and collation name #106
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Feb 22, 2022
1 parent 86ce7c1 commit 667d12b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Migration/Adapter/Generator/PhinxMySqlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ private function getTableMigrationNewDatabase(array $output, array $new, array $
if (empty($new['database'])) {
return $output;
}
if ($this->array->neq($new, $old, ['database', 'default_character_set_name'])) {
$output[] = $this->getAlterDatabaseCharset($new['database']['default_character_set_name']);
if ($this->array->neq($new, $old, ['database', 'DEFAULT_CHARACTER_SET_NAME'])) {
$output[] = $this->getAlterDatabaseCharset($new['database']['DEFAULT_CHARACTER_SET_NAME']);
}
if ($this->array->neq($new, $old, ['database', 'default_collation_name'])) {
$output[] = $this->getAlterDatabaseCollate($new['database']['default_collation_name']);
if ($this->array->neq($new, $old, ['database', 'DEFAULT_COLLATION_NAME'])) {
$output[] = $this->getAlterDatabaseCollate($new['database']['DEFAULT_COLLATION_NAME']);
}

return $output;
Expand Down

0 comments on commit 667d12b

Please sign in to comment.