lepikhinb / laravel-typescript

MIT License
387 stars 46 forks source link

ENUM types Not Supported #22

Closed wovosoft closed 1 year ago

wovosoft commented 1 year ago
 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
    437▕ 
    438▕         $dbType = strtolower($dbType);
    439▕ 
    440▕         if (! isset($this->doctrineTypeMapping[$dbType])) {
  ➜ 441▕             throw 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}()
CaReS0107 commented 1 year ago

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

        In some of your provider
wovosoft commented 1 year ago

Thank you

rkrater commented 10 months ago

@wovosoft did you get this to work?

wovosoft commented 10 months ago

@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