Skip to content

Commit

Permalink
バクアップからのレストア時にバックアップのテーブルが存在しない場合にエラーとなる問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Dec 4, 2023
1 parent aa7e58b commit c2ba68f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions plugins/baser-core/src/Service/BcDatabaseService.php
Original file line number Diff line number Diff line change
Expand Up @@ -1123,14 +1123,17 @@ public function loadSchema($options): bool
require_once $options['path'] . $options['file'];
/* @var BcSchema $schema */
$schema = new $schemaName();
$schema->setTable($options['prefix'] . $schema->table);
$table = $options['prefix'] . $schema->table;
$schema->setTable($table);

switch($options['type']) {
case 'create':
$schema->create();
break;
case 'drop':
$schema->drop();
if($this->tableExists($table)) {
$schema->drop();
}
break;
}
return true;
Expand Down

0 comments on commit c2ba68f

Please sign in to comment.