coolsam726/jetstream-inertia-generator

enum data type

abhitheawesomecoder opened this issue · 2 comments

support for enum datatype

Enums are supported by default in PHP 8.1 We will support php 8.1 in our next release and that should fix this issue.

@abhitheawesomecoder I don't think I had understood your issue. You must have meant the enum database type. This issue is due to the fact that Doctrine/DBAL does not support enum data type.
The workaround is to add the following to one of your service providers:

use Doctrine\DBAL\Types\StringType;
use Doctrine\DBAL\Types\Type;
use Illuminate\Support\Facades\DB;

    public function __construct()
    {
        if (! Type::hasType('enum')) {
            Type::addType('enum', StringType::class);
        }
        // For point types
        // DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('point', 'string');
        DB::getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');
    }

I will do a PR to add this to the jig service provider.

Take a look at this answer for more details: