From 3ed03ae95810b4ea333073b65efa65cdfb9b54bb Mon Sep 17 00:00:00 2001 From: Tobias Munk Date: Wed, 20 Jul 2022 14:22:32 +0200 Subject: [PATCH] use charset for mysql client command --- db/mysql/FileMigration.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/mysql/FileMigration.php b/db/mysql/FileMigration.php index 595412a..eea42a9 100755 --- a/db/mysql/FileMigration.php +++ b/db/mysql/FileMigration.php @@ -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);