mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-06 01:52:48 +08:00
完成自动缓存功能集成;
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use app\common\provider\db\Query;
|
||||
use think\facade\App;
|
||||
use think\facade\Env;
|
||||
|
||||
@@ -57,45 +58,48 @@ return [
|
||||
// 开启字段缓存
|
||||
'fields_cache' => Env::get('database.fields_cache', false),
|
||||
|
||||
'query' => Query::class
|
||||
],
|
||||
|
||||
'sqlite' => [
|
||||
// 数据库类型
|
||||
'type' => 'sqlite',
|
||||
|
||||
// 服务器地址
|
||||
'hostname' => Env::get('root_path').'ul.db',
|
||||
// 数据库名
|
||||
'database' => App::getRootPath().'ul.db',
|
||||
// 用户名
|
||||
'username' => Env::get('database.username', ''),
|
||||
// 密码
|
||||
'password' => Env::get('database.password', ''),
|
||||
// 端口
|
||||
'hostport' => Env::get('database.hostport', '3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', 'ul_'),
|
||||
// 数据库调试模式
|
||||
'debug' => Env::get('database.debug', true),
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要进行SQL性能分析
|
||||
'sql_explain' => false,
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
],
|
||||
'type' => 'sqlite',
|
||||
|
||||
// 服务器地址
|
||||
'hostname' => Env::get('root_path') . 'ul.db',
|
||||
// 数据库名
|
||||
'database' => App::getRootPath() . 'ul.db',
|
||||
// 用户名
|
||||
'username' => Env::get('database.username', ''),
|
||||
// 密码
|
||||
'password' => Env::get('database.password', ''),
|
||||
// 端口
|
||||
'hostport' => Env::get('database.hostport', '3306'),
|
||||
// 数据库连接参数
|
||||
'params' => [],
|
||||
// 数据库编码默认采用utf8
|
||||
'charset' => Env::get('database.charset', 'utf8'),
|
||||
// 数据库表前缀
|
||||
'prefix' => Env::get('database.prefix', 'ul_'),
|
||||
// 数据库调试模式
|
||||
'debug' => Env::get('database.debug', true),
|
||||
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
|
||||
'deploy' => 0,
|
||||
// 数据库读写是否分离 主从式有效
|
||||
'rw_separate' => false,
|
||||
// 读写分离后 主服务器数量
|
||||
'master_num' => 1,
|
||||
// 指定从服务器序号
|
||||
'slave_no' => '',
|
||||
// 是否严格检查字段是否存在
|
||||
'fields_strict' => true,
|
||||
// 是否需要进行SQL性能分析
|
||||
'sql_explain' => false,
|
||||
// 是否需要断线重连
|
||||
'break_reconnect' => false,
|
||||
|
||||
'query' => Query::class
|
||||
],
|
||||
|
||||
|
||||
// 更多的数据库配置信息
|
||||
|
||||
Reference in New Issue
Block a user