Add UTF8 charset to connection params

This commit is contained in:
Bart Visscher 2013-12-07 15:09:36 +01:00
parent e4c31b362e
commit 22edc42f54

View file

@ -99,6 +99,16 @@ class ConvertFromSqlite extends Command {
if ($input->getOption('port')) {
$connectionParams['port'] = $input->getOption('port');
}
switch ($type) {
case 'mysql':
case 'mssql':
$connectionParams['charset'] = 'UTF8';
break;
case 'oci':
$connectionParams['charset'] = 'AL32UTF8';
break;
}
$toDB = \Doctrine\DBAL\DriverManager::getConnection($connectionParams);
// create tables in new database