Skip to content

Commit

Permalink
fix: 更新初始化数据库配置
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujingli committed Oct 15, 2024
1 parent af7ef9b commit 3556156
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions plugin/think-plugs-static/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"plugin": {
"copy": {
"stc/think": "!think",
"stc/.env.example": ".env.example",
"stc/public/index.php": "!public/index.php",
"stc/public/static/plugs": "!public/static/plugs",
"stc/public/static/theme": "!public/static/theme",
Expand Down
9 changes: 5 additions & 4 deletions plugin/think-plugs-static/stc/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
'hostport' => env('db.mysql_hostport', '3306'),
// 数据库连接参数
'params' => [],
// 数据库编码默认采用 utf8
'charset' => env('mysql.charset', 'utf8mb4'),
// 数据库表前缀
'prefix' => env('mysql.prefix', ''),
'prefix' => env('db.mysql_prefix', ''),
// 数据库编码默认采用 utf8mb4
'charset' => env('db.mysql_charset', 'utf8mb4'),
// 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器)
'deploy' => 0,
// 数据库读写是否分离 主从式有效
Expand All @@ -62,11 +62,12 @@
'fields_cache' => isOnline(),
],
'sqlite' => [
'charset' => 'utf8',
// 数据库类型
'type' => 'sqlite',
// 数据库文件
'database' => syspath('database/sqlite.db'),
// 数据库编码默认采用 utf8
'charset' => 'utf8',
// 监听执行日志
'trigger_sql' => true,
// 其他参数字段
Expand Down

0 comments on commit 3556156

Please sign in to comment.