2025-11-05 16:34:40 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
/**
|
|
|
|
|
* This file is part of Hyperf.
|
|
|
|
|
*
|
|
|
|
|
* @link https://www.hyperf.io
|
|
|
|
|
* @document https://hyperf.wiki
|
|
|
|
|
* @contact group@hyperf.io
|
|
|
|
|
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
|
|
|
|
|
*/
|
|
|
|
|
use function Hyperf\Support\env;
|
|
|
|
|
|
|
|
|
|
return [
|
|
|
|
|
'default' => [
|
2025-11-10 10:45:43 +08:00
|
|
|
'driver' => env('DB_DRIVER', 'pgsql'),
|
|
|
|
|
'host' => env('DB_HOST', '127.0.0.1'),
|
|
|
|
|
'database' => env('DB_DATABASE', 'dataflow'),
|
|
|
|
|
'port' => env('DB_PORT', 5416),
|
|
|
|
|
'username' => env('DB_USERNAME', 'dataflow'),
|
|
|
|
|
'password' => env('DB_PASSWORD', 'dataflow'),
|
2025-11-05 16:34:40 +08:00
|
|
|
'charset' => env('DB_CHARSET', 'utf8'),
|
|
|
|
|
'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),
|
|
|
|
|
'prefix' => env('DB_PREFIX', ''),
|
2025-11-10 10:45:43 +08:00
|
|
|
'schema' => env('DB_SCHEMA', 'public'),
|
2025-11-12 09:33:13 +08:00
|
|
|
'timezone' => env('DB_TIMEZONE', 'Asia/Shanghai'),
|
2025-11-10 10:45:43 +08:00
|
|
|
'sslmode' => env('DB_SSL_MODE', 'prefer'),
|
2025-11-05 16:34:40 +08:00
|
|
|
'pool' => [
|
|
|
|
|
'min_connections' => 1,
|
|
|
|
|
'max_connections' => 10,
|
|
|
|
|
'connect_timeout' => 10.0,
|
|
|
|
|
'wait_timeout' => 3.0,
|
|
|
|
|
'heartbeat' => -1,
|
|
|
|
|
'max_idle_time' => (float) env('DB_MAX_IDLE_TIME', 60),
|
|
|
|
|
],
|
|
|
|
|
'commands' => [
|
|
|
|
|
'gen:model' => [
|
|
|
|
|
'path' => 'app/Model',
|
|
|
|
|
'force_casts' => true,
|
|
|
|
|
'inheritance' => 'Model',
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
],
|
2025-11-17 16:51:51 +08:00
|
|
|
'raw' => [
|
|
|
|
|
'driver' => 'mysql',
|
2026-02-06 09:14:43 +08:00
|
|
|
// 'host' => '127.0.0.1',
|
|
|
|
|
// 'port' => 3380,
|
|
|
|
|
// 'database' => 'wpic_task',
|
|
|
|
|
// 'username' => 'tools',
|
|
|
|
|
// 'password' => 'root',
|
|
|
|
|
'host' => '120.27.136.208',
|
|
|
|
|
'port' => 3306,
|
|
|
|
|
'database' => 'wpic',
|
|
|
|
|
'username' => 'wpic',
|
|
|
|
|
'password' => 'wpic#jsKk223',
|
2025-11-17 16:51:51 +08:00
|
|
|
'charset' => 'utf8',
|
|
|
|
|
'collation' => 'utf8_unicode_ci',
|
|
|
|
|
'prefix' => '',
|
|
|
|
|
'pool' => [
|
|
|
|
|
'min_connections' => 1,
|
|
|
|
|
'max_connections' => 10,
|
|
|
|
|
'connect_timeout' => 10.0,
|
|
|
|
|
'wait_timeout' => 3.0,
|
|
|
|
|
'heartbeat' => -1,
|
|
|
|
|
'max_idle_time' => (float)env('DB_MAX_IDLE_TIME', 60),
|
|
|
|
|
]
|
|
|
|
|
],
|
2025-11-05 16:34:40 +08:00
|
|
|
];
|