Skip to content

Commit f20e1d6

Browse files
committed
skip changes AC-11654: Integration test failing testDbSchemaUpToDate due to JSON column type
1 parent 42b1c58 commit f20e1d6

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@ public function __construct(
6767

6868
/**
6969
* @inheritdoc
70-
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
7170
*/
72-
public function build(Schema $schema, $tablesWithJsonTypeField = [])
71+
public function build(Schema $schema)
7372
{
7473
foreach ($this->sharding->getResources() as $resource) {
7574
foreach ($this->dbSchemaReader->readTables($resource) as $tableName) {
@@ -96,16 +95,9 @@ public function build(Schema $schema, $tablesWithJsonTypeField = [])
9695
'collation' => $tableOptions['collation']
9796
]
9897
);
99-
$isJsonType = false;
100-
if (count($tablesWithJsonTypeField) > 0 && isset($tablesWithJsonTypeField[$tableName])) {
101-
$isJsonType = true;
102-
}
10398

10499
// Process columns
105100
foreach ($columnsData as $columnData) {
106-
if ($isJsonType && $tablesWithJsonTypeField[$tableName] == $columnData['name']) {
107-
$columnData['type'] = 'json';
108-
}
109101
$columnData['table'] = $table;
110102
$column = $this->elementFactory->create($columnData['type'], $columnData);
111103
$columns[$column->getName()] = $column;

lib/internal/Magento/Framework/Setup/Declaration/Schema/SchemaConfig.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,8 @@ public function __construct(
6262
*/
6363
public function getDbConfig()
6464
{
65-
$declarativeSchema = $this->getDeclarationConfig();
66-
$tablesWithJsonTypeField = [];
67-
foreach ($declarativeSchema->getTables() as $table) {
68-
foreach ($table->getColumns() as $column) {
69-
if ($column->getType() == 'json') {
70-
$tablesWithJsonTypeField[$table->getName()] = $column->getName();
71-
}
72-
}
73-
}
7465
$schema = $this->schemaFactory->create();
75-
$schema = $this->dbSchemaBuilder->build($schema, $tablesWithJsonTypeField);
66+
$schema = $this->dbSchemaBuilder->build($schema);
7667
return $schema;
7768
}
7869

0 commit comments

Comments
 (0)