'yii\db\Connection', 'dsn' => 'mysql:host=amic-mysql;dbname=amic_new', 'username' => 'work', 'password' => 'work', 'charset' => 'utf8', // Schema cache options (for production environment) //'enableSchemaCache' => true, //'schemaCacheDuration' => 60, //'schemaCache' => 'cache', ]; if(defined("DB_DSN")){ $db = [ 'class' => 'yii\db\Connection', 'dsn' => 'mysql:host='.DB_DSN.';dbname='.DB_NAME, 'username' => DB_USER, 'password' => DB_PASSWORD, 'charset' => 'utf8', // Schema cache options (for production environment) //'enableSchemaCache' => true, //'schemaCacheDuration' => 60, //'schemaCache' => 'cache', ]; } return $db;