From 54486581aad8232fcdc3b17facb3dd03c0b240b5 Mon Sep 17 00:00:00 2001 From: Stu Heiss Date: Mon, 4 Feb 2019 14:26:16 -0600 Subject: [PATCH] Fix Undefined property: stdClass::$column_name 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 ... --- src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php b/src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php index 0ac0220..39d61bb 100644 --- a/src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php +++ b/src/Xethron/MigrationsGenerator/Generators/FieldGenerator.php @@ -55,7 +55,7 @@ protected function getEnum($table) ->where('table_schema', $this->database) ->where('table_name', $table) ->where('data_type', 'enum') - ->get(['column_name','column_type']); + ->get(['column_name as column_name','column_type as column_type']); if ($result) return $result; else