修复数据库改前缀写入问题

This commit is contained in:
taoser 2024-04-14 12:12:11 +08:00
parent 06cc3caf77
commit fd06749715
2 changed files with 2 additions and 2 deletions

View File

@ -85,7 +85,7 @@ class SqlFile
$sqlArr = self::loadSqlFile($sqlFile);
if(!empty($sqlArr)) {
$orginal = 'tao_'; //sql默认表前缀
$prefix = config('database.mysql.prefix'); // 现在表前缀
$prefix = config('database.connections.mysql.prefix'); // 现在表前缀
($orginal == $prefix) ? true : $sqlArr = str_replace(" `{$orginal}", " `{$prefix}", $sqlArr); //替换数组中表前缀
foreach($sqlArr as $v){
try {

View File

@ -16,7 +16,7 @@ return [
// 应用名,此项不可更改
'appname' => 'TaoLer',
// 版本配置
'version' => '2.5.7',
'version' => '2.5.8',
// 加盐
'salt' => 'taoler',
// 数据库备份目录