krlove / eloquent-model-generator

Eloquent Model Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

larcnhan opened this issue · comments

Add "$schemaManager->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string');" after line 44 of the "CustomPrimaryKeyProcessor.php" file

I checked the documentation but it didn't work to me. I couldn't find the file, I created it and I keep getting the same error

lo puedes buscar en la sección "https://github.com/krlove/eloquent-model-generator#registring-custom-database-types"
la idea es crear una configuración para el mapeo de tu base, el archivo que yo tengo en Mysql se ve así:

return [
    'namespace'       => 'App\\mymodel',
    'base_class_name' => \Illuminate\Database\Eloquent\Model::class,
    'output_path'     => 'Mymodel',
    'no_timestamps'   => null,
    'nombre_largo requested'     => null,
    'connection'      => 'mysql',
    'db_types' => [
        'enum' => 'string',
    ],
];`

que es el contenido de 
`eloquent_model_generator.php`

Sigue tirándome el mismo error.
Puse este código en config/eloquent_model_generator.php

<?php
return [
   [
  'namespace'       => 'App\\Models\\Comite',
  'base_class_name' => \Illuminate\Database\Eloquent\Model::class,
  'output_path'     => 'app/Models/Comite',
  'no_timestamps'   => null,
  'connection'      => 'mysql',
  'db_types' => [ 'enum' => 'string' ]
   ]
];

intenta por favor cambiarlo en:
\vendor\krlove\eloquent-model-generator\src\Resources\config.php
tal vez no te esta leyendo el archivo de configuracion.