Trying to find a way to programatically create tables with certain collation, but can't seem to find a way how to do it properly. I am using the "doctrine/doctrine-migrations-bundle": "2.1.*@dev" and Symfony 2.3,
I set up in my config.yml:
# Doctrine Configuration
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: LATIN1
orm:
auto_generate_proxy_classes: "%kernel.debug%"
entity_managers:
default:
auto_mapping: true
doctrine_migrations:
dir_name: %kernel.root_dir%/../src/CF/EscritorioBundle/Migrations
namespace: MyNameSpace\Migrations
table_name: migrations
name: Application Migrations
It creates the database with LATIN1 charset and latin1_swedish_ci as default collation, when I run doctrine:database:create
tool.
Then I run my migrations, and all the tables are utf8_general_ci
Looked into the $schema->createTable()
function, but cannot find the way to pass the collation I need to that. What is the proper workaround here?