* @copyright walkor * @link http://www.workerman.net/ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ return [ // 默认数据库 'default' => 'pgsql', // 各种数据库配置 'connections' => [ 'mysql' => [ 'driver' => 'mysql', 'host' => getenv('DB_HOST'), 'port' => getenv('DB_PORT'), 'database' => getenv('DB_NAME'), 'username' => getenv('DB_USER'), 'password' => getenv('DB_PASSWORD'), 'unix_socket' => '', 'charset' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, 'options' => [ \PDO::ATTR_TIMEOUT => 3 ] ], 'pgsql' => [ 'driver' => getenv('DB_PG_CONNECTION'), 'hostname' => getenv('DB_PG_HOST'), 'hostport' => getenv('DB_PG_PORT'), 'database' => getenv('DB_PG_NAME'), 'username' => getenv('DB_PG_USER'), 'password' => getenv('DB_PG_PASSWORD'), 'unix_socket' => '', 'charset' => 'utf8', 'prefix' => 'ad_', // 数据表前缀 'debug' => true, ] ], ];