[symfony-users] Re: Symfony2 Sandbox database collation
Hi, After reading the loadDbalConnection method of DoctrineExtension ( http://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/DoctrineBundle/DependencyInjection/DoctrineExtension.php#L137 ) I think you could test something like this: doctrine.dbal: connections: default: dbname: sf2test user: root password: pass driver: PDOMySql charset: utf8 But I have no idea for the collation option. It seems that your event suscriber is the only solution. On 9 sep, 11:28, Aleš ales.sark...@gmail.com wrote: How can i set the default collation in the sandbox with the YAML config: $em-getEventManager()-addEventSubscriber(new MysqlSessionInit('utf8','utf8_unicode_ci')); I found somewhere it should be like this: doctrine.dbal: dbname: s2test user: root password: pass options: collation: utf8_unicode_ci charset: utf8 But it doesn't work. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony2 Sandbox database collation
Thanks for the reply, but this is the configuration for Symfony1. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
[symfony-users] Re: Symfony2 Sandbox database collation
I was able to set the collation on a mysql database through YAML using the attributes default_table_charset and default_table_collate. Here's how my config/database.yml file looks like: all: doctrine: class: sfDoctrineDatabase param: dsn: 'mysql:host=yourHostServer;dbname=yourDbName' username: yourUserName password: yourUserPassword attributes: default_table_type: INNODB default_table_charset: utf8 default_table_collate: utf8_general_ci Hope it helps. On Sep 9, 5:28 am, Aleš ales.sark...@gmail.com wrote: How can i set the default collation in the sandbox with the YAML config: $em-getEventManager()-addEventSubscriber(new MysqlSessionInit('utf8','utf8_unicode_ci')); I found somewhere it should be like this: doctrine.dbal: dbname: s2test user: root password: pass options: collation: utf8_unicode_ci charset: utf8 But it doesn't work. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups symfony users group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en