Skip to content

Commit bf3e8dc

Browse files
authored
Merge pull request #33 from dmstr/feature/add-charset-client
use charset for mysql client command
2 parents febb1ea + 3ed03ae commit bf3e8dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

db/mysql/FileMigration.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ public function up()
5454
$command->addArg('-P', $dsnOpts['port']);
5555
$command->addArg('-u', $this->db->username);
5656
$command->addArg('--password=', $this->db->password);
57+
if ($this->db->charset) {
58+
$command->addArg('--default-character-set=', $this->db->charset);
59+
}
5760

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

0 commit comments

Comments
 (0)