db_old.php 790 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. $db = [
  3. 'class' => 'yii\db\Connection',
  4. 'dsn' => 'mysql:host=amic-mysql;dbname=amic_old',
  5. 'username' => 'work',
  6. 'password' => 'work',
  7. 'charset' => 'utf8',
  8. // Schema cache options (for production environment)
  9. //'enableSchemaCache' => true,
  10. //'schemaCacheDuration' => 60,
  11. //'schemaCache' => 'cache',
  12. ];
  13. if(defined("DB_OLD_DSN")){
  14. $db = [
  15. 'class' => 'yii\db\Connection',
  16. 'dsn' => 'mysql:host='.DB_OLD_DSN.';dbname='.DB_OLD_NAME,
  17. 'username' => DB_OLD_USER,
  18. 'password' => DB_OLD_PASSWORD,
  19. 'charset' => 'utf8',
  20. // Schema cache options (for production environment)
  21. //'enableSchemaCache' => true,
  22. //'schemaCacheDuration' => 60,
  23. //'schemaCache' => 'cache',
  24. ];
  25. }
  26. return $db;