'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'pgsql:host=127.0.0.1;dbname=dbname',
'username' => 'username',
'password' => 'pass',
'charset' => 'utf8',
'enableSchemaCache' => YII_DEBUG ? false : true,
]
]