We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af349d7 commit 5fceeedCopy full SHA for 5fceeed
src/Console/DbUpgradeCommand.php
@@ -363,12 +363,27 @@ protected function checkExistingDatabase(): void
363
}
364
365
366
+ /**
367
+ * @return string
368
+ */
369
+ protected function getDatabaseConnection(): string
370
+ {
371
+ return config('database.default');
372
+ }
373
+
374
/**
375
* @return array
376
*/
377
protected function getDatabaseConfig(): array
378
{
- return config('database.connections.mysql');
379
+ $config = config('database.connections.' . $this->getDatabaseConnection());
380
+ $driver = $config['driver'] ?? null;
381
382
+ if ($driver !== 'mysql') {
383
+ throw new DbUpgradeException('Only driver MySQL is supported.');
384
385
386
+ return $config;
387
388
389
0 commit comments