1234567891011121314151617181920212223242526272829 |
- <?php
- $db = [
- 'class' => 'yii\db\Connection',
- 'dsn' => 'mysql:host=amic-mysql;dbname=amic_old',
- 'username' => 'work',
- 'password' => 'work',
- 'charset' => 'utf8',
- // Schema cache options (for production environment)
- //'enableSchemaCache' => true,
- //'schemaCacheDuration' => 60,
- //'schemaCache' => 'cache',
- ];
- if(defined("DB_OLD_DSN")){
- $db = [
- 'class' => 'yii\db\Connection',
- 'dsn' => 'mysql:host='.DB_OLD_DSN.';dbname='.DB_OLD_NAME,
- 'username' => DB_OLD_USER,
- 'password' => DB_OLD_PASSWORD,
- 'charset' => 'utf8',
- // Schema cache options (for production environment)
- //'enableSchemaCache' => true,
- //'schemaCacheDuration' => 60,
- //'schemaCache' => 'cache',
- ];
- }
- return $db;
|