Hello,
how i can change database collate.
In yii1 i can do something like that
'db'=>array(
'connectionString'=>'sqlite:protected/data/source.db',
'initSQLs'=>'SET NAMES utf8 ;',
),
Hello,
how i can change database collate.
In yii1 i can do something like that
'db'=>array(
'connectionString'=>'sqlite:protected/data/source.db',
'initSQLs'=>'SET NAMES utf8 ;',
),
I think you are looking for this:
http://www.yiiframework.com/doc-2.0/guide-db-dao.html#creating-db-connections
'db' => [
// ...
'on afterOpen' => function($event) {
// $event->sender refers to the DB connection
$event->sender->createCommand("SET time_zone = 'UTC'")->execute();
}
],