Skip to content

Commit

Permalink
マイグレーションの問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Oct 13, 2024
1 parent 3022df7 commit 197c54a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/baser-core/src/Database/Migration/BcMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ class BcMigration extends AbstractMigration
*/
public function table(string $tableName, array $options = []): Table
{
$connection = $this->input->getOption('connection')?? 'default';
if($this->input->hasParameterOption('--connection')) {
$connection = $this->input->getParameterOption('--connection');
} else {
$connection = 'default';
}
$prefix = ConnectionManager::get($connection)->config()['prefix'];
return parent::table($prefix . $tableName);
}
Expand Down

0 comments on commit 197c54a

Please sign in to comment.