Skip to content

Commit

Permalink
use charset for mysql client command
Browse files Browse the repository at this point in the history
  • Loading branch information
schmunk42 committed Jul 20, 2022
1 parent febb1ea commit 3ed03ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions db/mysql/FileMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ public function up()
$command->addArg('-P', $dsnOpts['port']);
$command->addArg('-u', $this->db->username);
$command->addArg('--password=', $this->db->password);
if ($this->db->charset) {
$command->addArg('--default-character-set=', $this->db->charset);
}

foreach (CliHelper::getMysqlCliArgsFromPdo($this->db) as $opt => $value) {
$command->addArg($opt, $value);
Expand Down

0 comments on commit 3ed03ae

Please sign in to comment.