lepikhinb/laravel-typescript

ENUM types Not Supported

Closed this issue · 4 comments

 Doctrine\DBAL\Exception 

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

  at vendor/doctrine/dbal/src/Platforms/AbstractPlatform.php:441
    437438$dbType = strtolower($dbType);
    439440if (! isset($this->doctrineTypeMapping[$dbType])) {
  ➜ 441throw new Exception(
    442'Unknown database type ' . $dbType . ' requested, ' . static::class . ' may not support it.',
    443▕             );
    444▕         }
    445▕ 

      +8 vendor frames 
  9   [internal]:0
      Based\TypeScript\TypeScriptGenerator::Based\TypeScript\{closure}()

      +4 vendor frames 
  14  [internal]:0
      Based\TypeScript\TypeScriptGenerator::Based\TypeScript\{closure}()

Schema::getConnection()
->getDoctrineSchemaManager()
->getDatabasePlatform()
->registerDoctrineTypeMapping('enum', 'string');

        In some of your provider

Thank you

@wovosoft did you get this to work?

@wovosoft did you get this to work?

I didn't test it. I have developed my own package. I got lots of ideas from your package.

https://github.com/wovosoft/laravel-typescript