diff --git a/src/Commands/Migration/Migrate.php b/src/Commands/Migration/Migrate.php index ffdb24f..7e10092 100644 --- a/src/Commands/Migration/Migrate.php +++ b/src/Commands/Migration/Migrate.php @@ -57,7 +57,7 @@ public function handle() $this->eol()->info('Recherche des migrations en attente...'); - $group = $this->option('group', 'default'); + $group = $this->option('group', config('database.connection', 'default')); $namespace = $this->option('namespace', APP_NAMESPACE); $all = $this->option('all') === true; $pretend = $this->option('pretend') === true; diff --git a/src/Commands/Migration/Refresh.php b/src/Commands/Migration/Refresh.php index d105f91..130428f 100644 --- a/src/Commands/Migration/Refresh.php +++ b/src/Commands/Migration/Refresh.php @@ -52,7 +52,7 @@ public function handle() $this->eol()->info('Réinitialisation et réexécution des migrations...'); - $group = $this->option('group', 'default'); + $group = $this->option('group', config('database.connection', 'default')); $seed = $this->option('seed') === true; $this->newLine()->comment('Étape 1/2: Annulation de toutes les migrations'); diff --git a/src/Commands/Migration/Reset.php b/src/Commands/Migration/Reset.php index 2ac14dc..a53b0bb 100644 --- a/src/Commands/Migration/Reset.php +++ b/src/Commands/Migration/Reset.php @@ -49,7 +49,7 @@ public function handle() $this->eol()->info('Réinitialisation de toutes les migrations...'); - $group = $this->option('group', 'default'); + $group = $this->option('group', config('database.connection', 'default')); return $this->call('migrate:rollback', [ '--group' => $group, diff --git a/src/Commands/Migration/Rollback.php b/src/Commands/Migration/Rollback.php index 45d7cd5..bf3d447 100644 --- a/src/Commands/Migration/Rollback.php +++ b/src/Commands/Migration/Rollback.php @@ -55,7 +55,7 @@ public function handle() $this->eol()->info('Recherche des migrations à annuler...'); - $group = $this->option('group', 'default'); + $group = $this->option('group', config('database.connection', 'default')); $batch = $this->option('all') ? 0 : $this->option('batch', 1); if (is_string($batch) && ! preg_match('/^-?\d+$/', $batch)) { diff --git a/src/Commands/Migration/Status.php b/src/Commands/Migration/Status.php index dd7fd9f..51fdd1e 100644 --- a/src/Commands/Migration/Status.php +++ b/src/Commands/Migration/Status.php @@ -43,7 +43,7 @@ public function handle() { $this->eol()->info('Récupération du statut des migrations...'); - $group = $this->option('group', 'default'); + $group = $this->option('group', config('database.connection', 'default')); $runner = $this->runner('ALL', $group); $history = $runner->getHistory($group); diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index c8c8af3..1c2ff5b 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -53,7 +53,7 @@ class Seed extends DatabaseCommand */ public function handle() { - $group = $this->option('group'); + $group = $this->option('group', config('database.connection', 'default')); $silent = $this->option('silent') !== null; $locale = $this->option('locale', config('app.language', 'fr_FR')); diff --git a/src/Commands/TableInfo.php b/src/Commands/TableInfo.php index 8e11136..515f602 100644 --- a/src/Commands/TableInfo.php +++ b/src/Commands/TableInfo.php @@ -75,7 +75,7 @@ class TableInfo extends DatabaseCommand public function handle() { try { - $this->db = $this->resolver->connection($this->option('group')); + $this->db = $this->resolver->connection($this->option('group', config('database.connection', 'default'))); } catch (InvalidArgumentException $e) { $this->fail($e->getMessage());