framework icon indicating copy to clipboard operation
framework copied to clipboard

Problem with the new db:show command

Open Sergiobop opened this issue 3 years ago • 3 comments

  • Laravel Version: 9.24.0
  • PHP Version: 8.1

Description:

The command works fine, but i get multiple errors in my log: local.ERROR: Undefined array key "engine" {"exception":"[object] (ErrorException(code: 0): Undefined array key "engine" at ...vendor/doctrine/dbal/src/Schema/Table.php:888)

Steps To Reproduce:

Using the new php artisan db:show

Sergiobop avatar Aug 09 '22 16:08 Sergiobop

What database engine are you using? Can you share the full error output please?

jbrooksuk avatar Aug 09 '22 17:08 jbrooksuk

It appears this new command also has problems showing enum data types

ZebTheWizard avatar Aug 10 '22 00:08 ZebTheWizard

Hi @jbrooksuk , i'm using pgsql driver. The config is the default:

  'pgsql' => [
            'driver' => 'pgsql',
            'url' => env('DATABASE_URL'),
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '5432'),
            'database' => env('DB_DATABASE', 'forge'),
            'username' => env('DB_USERNAME', 'forge'),
            'password' => env('DB_PASSWORD', ''),
            'charset' => 'utf8',
            'prefix' => '',
            'prefix_indexes' => true,
            'search_path' => 'public',
            'sslmode' => 'prefer',
        ],

I get multiple times the error: Undefined array key "engine" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"engine\" at .../vendor/doctrine/dbal/src/Schema/Table.php:888)

Maybe it's related to the config array keys? In the mysql driver, we have that 'engine' key.

The output is 'fine' though, (i only see URL and Open Connections missing). I can see the Postgres database, host, port, etc and my tables.

Thanks

Sergiobop avatar Aug 10 '22 07:08 Sergiobop

Seems a PR was sent in. Thanks all.

driesvints avatar Aug 11 '22 06:08 driesvints