Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command php artisan db:show returns exception on laravel version 9.24 with mysql 5.7 database #43630

Closed
vineethck opened this issue Aug 10, 2022 · 2 comments · Fixed by #43635
Assignees

Comments

@vineethck
Copy link

  • Laravel Version: 9.24.0
  • PHP Version: 8.1.9
  • Database Driver & Version: Mysql 5.7.38

Description:

php artisan db:show returns "Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it." on mysql 5.7

   Doctrine\DBAL\Exception 

  Unknown database type enum requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it.

  at vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:418
    414▕ 
    415▕         $dbType = strtolower($dbType);
    416▕ 
    417▕         if (! isset($this->doctrineTypeMapping[$dbType])) {
  ➜ 418▕             throw new Exception(
    419▕                 'Unknown database type ' . $dbType . ' requested, ' . static::class . ' may not support it.'
    420▕             );
    421▕         }
    422▕ 

      +19 vendor frames 
  20  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Steps To Reproduce:

Run command php artisan db:show on laravel version 9.24 with mysql 5.7 database

@lorenzolosa
Copy link
Contributor

Same here, except it mentions Doctrine\DBAL\Platforms\MariaDb1027Platform instead of Doctrine\DBAL\Platforms\MySQL57Platform as I'm using MariaDB.

The same exception is thrown by db:table and model:show when the table uses an enum column (I'm not attaching the output as it's identical).

  • Laravel Version: 9.24.0
  • PHP Version: 8.1.2
  • Database Driver & Version: MariaDB 10.6.7

@driesvints
Copy link
Member

Seems a PR was sent in. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants