Skip to content

Commit e16c4e4

Browse files
committed
AC-11654::Integration test failing testDbSchemaUpToDate due to JSON column type
1 parent 8917571 commit e16c4e4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL/DbSchemaReader.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DbSchemaReader implements DbSchemaReaderInterface
2121
/**
2222
* Table type in information_schema.TABLES which allows to identify only tables and ignore views
2323
*/
24-
const MYSQL_TABLE_TYPE = 'BASE TABLE';
24+
public const MYSQL_TABLE_TYPE = 'BASE TABLE';
2525

2626
/**
2727
* @var ResourceConnection
@@ -81,7 +81,7 @@ public function getTableOptions($tableName, $resource)
8181
*
8282
* @param string $tableName
8383
* @param string $resource
84-
* @param array $tablesWithJsonTypeField
84+
* @param array $tablesWithJsonTypeField
8585
* @return array
8686
*/
8787
public function readColumns($tableName, $resource, $tablesWithJsonTypeField = [])
@@ -109,7 +109,8 @@ public function readColumns($tableName, $resource, $tablesWithJsonTypeField = []
109109
$columnsDefinition = $adapter->fetchAssoc($stmt);
110110

111111
foreach ($columnsDefinition as $columnDefinition) {
112-
if (count($tablesWithJsonTypeField) > 0 && isset($tablesWithJsonTypeField[$tableName]) && $tablesWithJsonTypeField[$tableName] == $columnDefinition['name']) {
112+
if (count($tablesWithJsonTypeField) > 0 && isset($tablesWithJsonTypeField[$tableName])
113+
&& $tablesWithJsonTypeField[$tableName] == $columnDefinition['name']) {
113114
$columnDefinition['type'] = 'json';
114115
}
115116
$column = $this->definitionAggregator->fromDefinition($columnDefinition);

lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/SchemaBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
public function build(Schema $schema, $declarativeSchema = null)
7272
{
7373
$tablesWithJsonTypeField = [];
74-
if($declarativeSchema != null) {
74+
if ($declarativeSchema != null) {
7575
foreach ($declarativeSchema->getTables() as $table) {
7676
foreach ($table->getColumns() as $column) {
7777
if ($column->getType() == 'json') {

0 commit comments

Comments
 (0)