[Doctrine\DBAL\DBALException]Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.
It is a known issue as stated in Laravel 5.1 documentation.
Note: Renaming columns in a table with a enum column is not currently supported.
It happens when you have a enum column in your database table. Whether you are trying to rename another column, or change another column to nullable, this bug will appear. It's an issue with Doctrine\DBAL.
An easy fix for this is to just add this constructor method in your database migration file.
public function __construct()
{
DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
}
This will map all the ENUM columns to VARCHAR(), and the column will accept any string.
This worked for me on Laravel 5.1 and Laravel 5.3. I hope this bug can be fixed soon.
Credit to @Gmatkowski's answer at https://stackoverflow.com/a/32860409/1193201
Also in PHP:
- WooCommerce Add Long Description to Products on Shop Page with Character limit
- FORCE CAPS LOCK PHP
- branch from other branch
- check if string contains . php
- codeigniter validation text length
- datetime default format hour format ph
- check if words are available in string in php
- In PackageManifest.php line 131: Undefined index: name laravel 7
- can i throw exception in catch block php
- file_get_contents() ssl operation failed with code 1
- dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib Referenced from: /usr/local/bin/php Reason: image not found zsh: abort bin/console sw:cache:clear
- display off php error
- clear cache laravel command
- cache laravel clear
- codeigniter where order by
- Class 'App\Http\Controllers\Auth' not found
- addeventlistener doesn't work in laravel?
- C:\MyScans in php server run file
- PHP get todat date
- find length of string php
- check method in laravel
- PHP message: PHP Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the type string, null given
- $url = $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
- controller in laravel 8