Skip to content

Commit

Permalink
Fix getListTableColumnsSQL() columns order on MySQL 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Dec 1, 2018
1 parent 8c030c9 commit 69225d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ public function getListTableColumnsSQL($table, $database = null)
return 'SELECT COLUMN_NAME AS Field, COLUMN_TYPE AS Type, IS_NULLABLE AS `Null`, ' .
'COLUMN_KEY AS `Key`, COLUMN_DEFAULT AS `Default`, EXTRA AS Extra, COLUMN_COMMENT AS Comment, ' .
'CHARACTER_SET_NAME AS CharacterSet, COLLATION_NAME AS Collation ' .
'FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ' . $database . ' AND TABLE_NAME = ' . $table;
'FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ' . $database . ' AND TABLE_NAME = ' . $table . ' ' .
'ORDER BY ORDINAL_POSITION ASC';
}

public function getListTableMetadataSQL(string $table, ?string $database = null) : string
Expand Down

0 comments on commit 69225d9

Please sign in to comment.