fix: better check for Db connection during init

This commit is contained in:
Phan An 2024-07-03 21:38:43 +02:00
parent 9b203374a5
commit c2052d37a7

View file

@ -249,7 +249,8 @@ class InitCommand extends Command
try {
// Make sure the config cache is cleared before another attempt.
Artisan::call('config:clear', ['--quiet' => true]);
$this->db->reconnect()->getPdo();
$this->db->reconnect();
$this->db->getDoctrineSchemaManager()->listTables();
break;
} catch (Throwable $e) {