framework
framework copied to clipboard
New command php artisan db:show returns exception on laravel version 9.24 with mysql 5.7 database
- 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
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
Seems a PR was sent in. Thanks all.