Skip to content

Commit

Permalink
Seedクラスにて、DBの接続先を切り替えれない問題を改善
Browse files Browse the repository at this point in the history
ユニットテストではうまくいっていたが、外部プラグインなどでうまくいっていなかった。
  • Loading branch information
ryuring committed Dec 30, 2024
1 parent 2142315 commit dc8f605
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/baser-core/src/Database/Migration/BcSeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function table(string $tableName, array $options = []): Table
{
if($this->input->hasParameterOption('connection')) {
$connection = $this->input->getParameterOption('connection');
} elseif($this->input->hasParameterOption('--connection')) {
$connection = $this->input->getParameterOption('--connection');
} else {
$connection = 'default';
}
Expand Down

0 comments on commit dc8f605

Please sign in to comment.