I am using Doctrine with Symfony2. My config.yml file looks something like this:-
doctrine:
dbal:
driver: %data
I met the same problems. By search the code, I find the code in vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
if ( ! isset($options['collate'])) {
$options['collate'] = 'utf8_unicode_ci';
}
So I changed it to 'utf8_general_ci', and it worked. All of tables' collation changed to utf8_general_ci after rebuild, but I still have one question: when I changed the annotations, I got the following error message:
[Creation Error] The annotation @ORM\Table declared on class Gvsun\UserBundle\Entity\User does not have a property named "collation". Available properties: name, schema, indexes, uniqueConstraints, options
I search the documentation of Doctrine, but I didn't find the 'option' property, can someone tell me how to use options property, I think it might be able to change collate in annotations settings?