From 0f87c990f9888c079a4d1ff938c40404d2cc89c3 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 8 Jan 2014 22:44:33 +0400 Subject: [PATCH] Advanced app template: moved database connection DSN, login and password to -local config not to expose it to VCS --- apps/advanced/common/config/params.php | 3 --- apps/advanced/environments/dev/common/config/params-local.php | 5 +++++ apps/advanced/environments/prod/common/config/params-local.php | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/apps/advanced/common/config/params.php b/apps/advanced/common/config/params.php index c378364..7b9a51a 100644 --- a/apps/advanced/common/config/params.php +++ b/apps/advanced/common/config/params.php @@ -20,9 +20,6 @@ return [ 'components.db' => [ 'class' => 'yii\db\Connection', - 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', - 'username' => 'root', - 'password' => '', 'charset' => 'utf8', ], ]; diff --git a/apps/advanced/environments/dev/common/config/params-local.php b/apps/advanced/environments/dev/common/config/params-local.php index d0b9c34..47edec1 100644 --- a/apps/advanced/environments/dev/common/config/params-local.php +++ b/apps/advanced/environments/dev/common/config/params-local.php @@ -1,3 +1,8 @@ [ + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', + 'username' => 'root', + 'password' => '', + ], ]; diff --git a/apps/advanced/environments/prod/common/config/params-local.php b/apps/advanced/environments/prod/common/config/params-local.php index d0b9c34..47edec1 100644 --- a/apps/advanced/environments/prod/common/config/params-local.php +++ b/apps/advanced/environments/prod/common/config/params-local.php @@ -1,3 +1,8 @@ [ + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', + 'username' => 'root', + 'password' => '', + ], ];