Skip to content

Commit

Permalink
DBプレフィックス付きの環境の場合、バックアップファイルが正常に生成されない問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Sep 18, 2024
1 parent 3356d02 commit d3f0488
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/baser-core/src/Service/UtilitiesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace BaserCore\Service;

use BaserCore\Error\BcException;
use BaserCore\Model\Table\AppTable;
use BaserCore\Utility\BcContainerTrait;
use BaserCore\Utility\BcFolder;
use BaserCore\Utility\BcUtil;
Expand Down Expand Up @@ -366,7 +367,7 @@ protected function _writeBackup($path, $plugin, $encoding)

foreach($tables as $table) {
$baredTable = preg_replace('/^' . $prefix . '/', '', $table);
if (!isset($tableList[$plugin]) || !in_array($baredTable, $tableList[$plugin])) continue;
if (!isset($tableList[$plugin]) || !in_array($table, $tableList[$plugin])) continue;
if (!$dbService->writeSchema($baredTable, [
'path' => $path,
'prefix' => $prefix
Expand Down

0 comments on commit d3f0488

Please sign in to comment.