Open stuheiss opened 5 years ago
I encountered the exact same error message while using xethron/migrations-generator ^2.0 However, I was using this in a Lumen 5.5.*, PHP 7.1.27 no OpCache implementation. Bear in mind that OpCache will cause other problems. Steps:
composer require --dev "xethron/migrations-generator"
bootstrap\app.php $app->register(\Way\Generators\GeneratorsServiceProvider::class); $app->register(\Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class);
vendor\laravel\lumen-framework\src\Application.php at the bottom append the following: public function configPath($path = ''){ return $this->basePath.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path); }
vendor\xethron\laravel-4-generators\src\config\config.php at the top add the following: function app_path($path = '') { return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path); }
vendor\xethron\laravel-4-generators\src\Way\Generators\GeneratorsServiceProvider.php Change the boot() function to the following: public function boot(){ $path = 'generators.config.php'; $basePath = '../../../../../../../../'; // this points back to the project base folder $this->publishes([ DIR.'/../../config/config.php' => $basePath.DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path), ]); }
vendor\xethron\laravel-4-generators\src\Way\Generators\Commands\GeneratorCommand.php comment out //use Config and replace it with use Illuminate\Support\Fascades\Config;
php artisan --> should work normally now
try to do a "php artisan migrate:generate" and see if the same error message appears or not. If it does, then take a look at your table schema and change enum's to chars instead.
--Jemmy
I encountered this issue and the PR fixed it for me, it seems to happen specifically when running laradock, at least for me, +1
Okay, so any ideas how best to fix this?
I'm getting this issue now for one of my tables which has an ENUM field, for whatever reason.
Also interested in a fix for this one.
Any chance this issue could be fixed? Or maybe even upgraded to Laravel 7.x?
i have same problem . any body have resolve for this issue ?
configuration : php7.1 laravel 5.3 mysql 8.0.22
ErrorException in MySqlProcessor.php line 18: Undefined property: stdClass::$column_name
The simple workaround for now is to update the file vendor/xethron/migrations-generator/src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php
. On line 82 and 83, change column_name
to COLUMN_NAME
and column_type
to COLUMN_TYPE
.
Then the command should run through :+1:
Querying information_schema.columns returns upper cased column names on some versions of mysqld. This is similar to an old bug in laravel/framework. See https://github.com/laravel/framework/issues/20190
Fix by changing select column_name, column_type ... to select column_name as column_name, column_type as column_type ...