Xethron / migrations-generator

Laravel Migrations Generator: Automatically generate your migrations from an existing database schema.
MIT License
3.33k stars 588 forks source link

Fixed exception in generating enum column type #196

Open djunehor opened 4 years ago

djunehor commented 4 years ago

While using the package for a project, I get this error:

In FieldGenerator.php line 79:
Undefined property: stdClass::$column_name
When I dumped the content of $column, I saw it's this:

stdClass Object ( [COLUMN_NAME] => status [COLUMN_TYPE] => enum('UNSET','SELECTED','PASSED','FAILED','PROFILE_CREATED','PROFILE_EDITED') ) So, I modified that part of the code to be able to set the $column->column_name as $column->COLUMN_NAME and $column->column_type too.