Merge pull request #19568 from faissaloux/fix/table-structure-columns-order

Fix columns order in Table Structure



Fixes #19558
This commit is contained in:
Faissal Wahabali 2025-03-17 13:25:24 +00:00 committed by GitHub
parent b2cc10a4b3
commit ad3072cd97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 52 additions and 32 deletions

View File

@ -154,7 +154,8 @@ class Generator
. ' = ' . $quotedDatabase
. ' AND `TABLE_NAME` ' . Util::getCollateForIS()
. ' = ' . $quotedTable
. ($quotedColumn !== null ? ' AND `COLUMN_NAME` = ' . $quotedColumn : '');
. ($quotedColumn !== null ? ' AND `COLUMN_NAME` = ' . $quotedColumn : '')
. ' ORDER BY `ORDINAL_POSITION`';
}
public static function getColumnNamesAndTypes(
@ -168,7 +169,8 @@ class Generator
. ' WHERE `TABLE_SCHEMA` ' . Util::getCollateForIS()
. ' = ' . $quotedDatabase
. ' AND `TABLE_NAME` ' . Util::getCollateForIS()
. ' = ' . $quotedTable;
. ' = ' . $quotedTable
. ' ORDER BY `ORDINAL_POSITION`';
}
public static function getInformationSchemaRoutinesRequest(

View File

@ -64,7 +64,8 @@ class RelationTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'information_schema\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'PMA\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'PMA\''
. ' ORDER BY `ORDINAL_POSITION`',
[],
);
@ -108,7 +109,8 @@ class RelationTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'information_schema\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'NON_EXISTING_TABLE\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'NON_EXISTING_TABLE\''
. ' ORDER BY `ORDINAL_POSITION`',
[],
);
$db = 'information_schema';

View File

@ -74,7 +74,8 @@ final class BrowseForeignersControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'\' AND `TABLE_NAME`'
. ' COLLATE utf8_bin = \'actor\'',
. ' COLLATE utf8_bin = \'actor\''
. ' ORDER BY `ORDINAL_POSITION`',
[
['actor_id', 'smallint(5) unsigned', null, 'NO', 'PRI', null, 'auto_increment', '', ''],
['first_name', 'varchar(45)', null, 'NO', '', null, '', '', ''],

View File

@ -85,7 +85,8 @@ class ImportControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma_test\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'table1\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'table1\''
. ' ORDER BY `ORDINAL_POSITION`',
[],
);

View File

@ -45,7 +45,7 @@ class EnumValuesControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'cvv\' AND `TABLE_NAME`'
. ' COLLATE utf8_bin = \'enums\' AND `COLUMN_NAME` = \'set\'', false);
. ' COLLATE utf8_bin = \'enums\' AND `COLUMN_NAME` = \'set\' ORDER BY `ORDINAL_POSITION`', false);
$this->dummyDbi->addResult('SHOW INDEXES FROM `cvv`.`enums`', false);
Current::$database = 'cvv';
@ -90,7 +90,8 @@ class EnumValuesControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'cvv\' AND `TABLE_NAME` COLLATE utf8_bin = \'enums\''
. ' AND `COLUMN_NAME` = \'set\'',
. ' AND `COLUMN_NAME` = \'set\''
. ' ORDER BY `ORDINAL_POSITION`',
[
[
'set',

View File

@ -45,7 +45,7 @@ class SetValuesControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'cvv\' AND `TABLE_NAME`'
. ' COLLATE utf8_bin = \'enums\' AND `COLUMN_NAME` = \'set\'', false);
. ' COLLATE utf8_bin = \'enums\' AND `COLUMN_NAME` = \'set\' ORDER BY `ORDINAL_POSITION`', false);
$this->dummyDbi->addResult('SHOW INDEXES FROM `cvv`.`enums`', false);
$request = ServerRequestFactory::create()->createServerRequest('POST', 'https://example.com/')
@ -90,7 +90,8 @@ class SetValuesControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'cvv\' AND `TABLE_NAME` COLLATE utf8_bin = \'enums\''
. ' AND `COLUMN_NAME` = \'set\'',
. ' AND `COLUMN_NAME` = \'set\''
. ' ORDER BY `ORDINAL_POSITION`',
[
[
'set',

View File

@ -40,7 +40,8 @@ class CreateControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'new_test_table\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'new_test_table\''
. ' ORDER BY `ORDINAL_POSITION`',
false,
);
$dummyDbi->addResult(
@ -50,7 +51,8 @@ class CreateControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'new_test_table\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'new_test_table\''
. ' ORDER BY `ORDINAL_POSITION`',
false,
);
$dummyDbi->addResult('SHOW CREATE TABLE `test_db`.`new_test_table`', false);

View File

@ -42,7 +42,8 @@ class GetFieldControllerTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'table_with_blob\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'table_with_blob\''
. ' ORDER BY `ORDINAL_POSITION`',
[
['id', 'int(11)', null, 'NO', 'PRI', null, 'auto_increment', '', ''],
['file', 'blob', null, 'NO', '', null, '', '', ''],

View File

@ -865,7 +865,8 @@ class DatabaseInterfaceTest extends AbstractTestCase
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'test_table\''
. ' AND `COLUMN_NAME` = \'test_column\'',
. ' AND `COLUMN_NAME` = \'test_column\''
. ' ORDER BY `ORDINAL_POSITION`',
[['test_column', 'varchar(45)', null, 'NO', '', null, '', '', '']],
['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
);
@ -889,7 +890,8 @@ class DatabaseInterfaceTest extends AbstractTestCase
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'test_table\''
. ' AND `COLUMN_NAME` = \'test_column\'',
. ' AND `COLUMN_NAME` = \'test_column\''
. ' ORDER BY `ORDINAL_POSITION`',
// phpcs:ignore Generic.Files.LineLength.TooLong
[['test_column', 'varchar(45)', 'utf8mb4_general_ci', 'NO', '', null, '', 'select,insert,update,references', '']],
['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],

View File

@ -22,7 +22,8 @@ class GeneratorTest extends AbstractTestCase
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`, `COLUMN_DEFAULT` AS `Default`,'
. ' `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mydb\''
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\'',
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\''
. ' ORDER BY `ORDINAL_POSITION`',
Generator::getColumns(
"'mydb'",
"'mytable'",
@ -33,7 +34,8 @@ class GeneratorTest extends AbstractTestCase
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`, `COLUMN_DEFAULT` AS `Default`,'
. ' `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mydb\''
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\' AND `COLUMN_NAME` = \'_idcolumn\'',
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\' AND `COLUMN_NAME` = \'_idcolumn\''
. ' ORDER BY `ORDINAL_POSITION`',
Generator::getColumns(
"'mydb'",
"'mytable'",
@ -45,7 +47,8 @@ class GeneratorTest extends AbstractTestCase
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`, `COLUMN_DEFAULT` AS `Default`,'
. ' `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mydb\''
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\'',
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\''
. ' ORDER BY `ORDINAL_POSITION`',
Generator::getColumns(
"'mydb'",
"'mytable'",
@ -57,7 +60,8 @@ class GeneratorTest extends AbstractTestCase
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`, `COLUMN_DEFAULT` AS `Default`,'
. ' `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mydb\''
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\' AND `COLUMN_NAME` = \'_idcolumn\'',
. ' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\' AND `COLUMN_NAME` = \'_idcolumn\''
. ' ORDER BY `ORDINAL_POSITION`',
Generator::getColumns(
"'mydb'",
"'mytable'",

View File

@ -544,7 +544,8 @@ class SqlTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'sakila\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'country\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'country\''
. ' ORDER BY `ORDINAL_POSITION`',
[
[
'country_id',
@ -589,7 +590,8 @@ class SqlTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'sakila\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'country\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'country\''
. ' ORDER BY `ORDINAL_POSITION`',
[
['country_id', 'smallint(5) unsigned', null, 'NO', 'PRI', null, 'auto_increment', '', ''],
['country', 'varchar(50)', null, 'NO', '', null, '', '', ''],

View File

@ -446,7 +446,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma_test\' AND `TABLE_NAME` COLLATE utf8_bin = \'table1\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma_test\' AND `TABLE_NAME` COLLATE utf8_bin = \'table1\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['i', 'int(11)', null, 'NO', 'PRI', 'NULL', 'auto_increment', '', ''],
@ -459,7 +459,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma_test\' AND `TABLE_NAME` COLLATE utf8_bin = \'table2\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma_test\' AND `TABLE_NAME` COLLATE utf8_bin = \'table2\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['i', 'int(11)', null, 'NO', 'PRI', 'NULL', 'auto_increment', '', ''],
@ -473,7 +473,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma\' AND `TABLE_NAME` COLLATE utf8_bin = \'table1\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'pma\' AND `TABLE_NAME` COLLATE utf8_bin = \'table1\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['i', 'int(11)', null, 'NO', 'PRI', 'NULL', 'auto_increment', '', ''],
@ -1333,7 +1333,7 @@ class DbiDummy implements DbiExtension
. ' `Null`, `COLUMN_KEY` AS `Key`, `COLUMN_DEFAULT` AS `Default`,'
. ' `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`,'
. ' `COLUMN_COMMENT` AS `Comment` FROM `information_schema`.`COLUMNS`'
. " WHERE `TABLE_SCHEMA` = 'information_schema' AND `TABLE_NAME` = 'PMA'",
. " WHERE `TABLE_SCHEMA` = 'information_schema' AND `TABLE_NAME` = 'PMA' ORDER BY `ORDINAL_POSITION`",
'result' => [],
],
[
@ -1363,7 +1363,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'my_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_tbl\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'my_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_tbl\' ORDER BY `ORDINAL_POSITION`',
'result' => [],
],
[
@ -1385,7 +1385,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'PMA_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'PMA_table\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'PMA_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'PMA_table\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['id', 'int(11)', null, 'NO', 'PRI', null, 'auto_increment', '', ''],
@ -1499,7 +1499,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mysql\' AND `TABLE_NAME` COLLATE utf8_bin = \'user\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'mysql\' AND `TABLE_NAME` COLLATE utf8_bin = \'user\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [['host', 'char(60)', null, 'NO', '', null, '', '', '']],
],
@ -1626,7 +1626,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'testdb\' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'testdb\' AND `TABLE_NAME` COLLATE utf8_bin = \'mytable\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['aid', 'tinyint(4)', null, 'NO', 'PRI', null, '', 'select,insert,update,references', ''],
@ -1664,7 +1664,7 @@ class DbiDummy implements DbiExtension
],
],
[
'query' => 'SELECT `COLUMN_NAME`, `COLUMN_TYPE` FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_table\'',
'query' => 'SELECT `COLUMN_NAME`, `COLUMN_TYPE` FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_table\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['COLUMN_NAME', 'COLUMN_TYPE'],
'result' => [
['id', 'int(11)'],
@ -1686,7 +1686,7 @@ class DbiDummy implements DbiExtension
. ' `IS_NULLABLE` AS `Null`, `COLUMN_KEY` AS `Key`,'
. ' `COLUMN_DEFAULT` AS `Default`, `EXTRA` AS `Extra`, `PRIVILEGES` AS `Privileges`, `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_table\'',
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'test_db\' AND `TABLE_NAME` COLLATE utf8_bin = \'test_table\' ORDER BY `ORDINAL_POSITION`',
'columns' => ['Field', 'Type', 'Collation', 'Null', 'Key', 'Default', 'Extra', 'Privileges', 'Comment'],
'result' => [
['id', 'int(11)', null, 'NO', 'PRI', "'NULL'", 'auto_increment', '', ''],

View File

@ -39,7 +39,8 @@ class ColumnsDefinitionTest extends AbstractTestCase
. ' `COLUMN_COMMENT` AS `Comment`'
. ' FROM `information_schema`.`COLUMNS`'
. ' WHERE `TABLE_SCHEMA` COLLATE utf8_bin = \'sakila\' AND'
. ' `TABLE_NAME` COLLATE utf8_bin = \'actor\'',
. ' `TABLE_NAME` COLLATE utf8_bin = \'actor\''
. ' ORDER BY `ORDINAL_POSITION`',
[
['actor_id', 'smallint(5) unsigned', null, 'NO', 'PRI', null, 'auto_increment', 'select,insert,update,references', ''],
['first_name', 'varchar(45)', 'utf8mb4_general_ci', 'NO', '', null, '', 'select,insert,update,references', ''],