"Unknown database type json requested, Doctrine\DBAL\Platforms\MySQL57Platform may not support it." while running php artisan migrate command
try this solution may be this will work for you,
public function __construct()
{
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('json', 'text');
}
For further reading about this issue check Issue #15772 at laravel repo
If you found this question at google, but your case is Symfony, but not Laravel - this is an answer.
Had same issue: Unknown database type json requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.
at Symfony/Sylius.
The reason - I had serverVersion=5.5
rather than serverVersion=5.7
at my app's .env
file, when doctrine 2.6+
was installed by composer.
So right DATABASE_URL
will be: DATABASE_URL=mysql://[email protected]/database_%kernel.environment%?serverVersion=5.7