diff --git a/src/OscarAFDev/MigrationsGenerator/Generators/FieldGenerator.php b/src/OscarAFDev/MigrationsGenerator/Generators/FieldGenerator.php index 4009619..54e7e76 100644 --- a/src/OscarAFDev/MigrationsGenerator/Generators/FieldGenerator.php +++ b/src/OscarAFDev/MigrationsGenerator/Generators/FieldGenerator.php @@ -73,8 +73,8 @@ protected function getEnum($table) protected function setEnum(array $fields, $table) { foreach ($this->getEnum($table) as $column) { - $fields[$column->COLUMN_NAME]['type'] = 'enum'; - $fields[$column->COLUMN_NAME]['args'] = str_replace('enum(', 'array(', $column->COLUMN_TYPE); + $fields[$column->column_name]['type'] = 'enum'; + $fields[$column->column_name]['args'] = str_replace('enum(', 'array(', $column->column_type); } return $fields; }