From f20e1d6cc2906343056f698e0f4aa09dabb696c7 Mon Sep 17 00:00:00 2001 From: Banvari Lal Date: Tue, 4 Jun 2024 20:43:42 +0530 Subject: [PATCH] skip changes AC-11654: Integration test failing testDbSchemaUpToDate due to JSON column type --- .../Setup/Declaration/Schema/Db/SchemaBuilder.php | 10 +--------- .../Setup/Declaration/Schema/SchemaConfig.php | 11 +---------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/SchemaBuilder.php b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/SchemaBuilder.php index 48dd678b43a50..f73fc44102ec2 100644 --- a/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/SchemaBuilder.php +++ b/lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/SchemaBuilder.php @@ -67,9 +67,8 @@ public function __construct( /** * @inheritdoc - * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ - public function build(Schema $schema, $tablesWithJsonTypeField = []) + public function build(Schema $schema) { foreach ($this->sharding->getResources() as $resource) { foreach ($this->dbSchemaReader->readTables($resource) as $tableName) { @@ -96,16 +95,9 @@ public function build(Schema $schema, $tablesWithJsonTypeField = []) 'collation' => $tableOptions['collation'] ] ); - $isJsonType = false; - if (count($tablesWithJsonTypeField) > 0 && isset($tablesWithJsonTypeField[$tableName])) { - $isJsonType = true; - } // Process columns foreach ($columnsData as $columnData) { - if ($isJsonType && $tablesWithJsonTypeField[$tableName] == $columnData['name']) { - $columnData['type'] = 'json'; - } $columnData['table'] = $table; $column = $this->elementFactory->create($columnData['type'], $columnData); $columns[$column->getName()] = $column; diff --git a/lib/internal/Magento/Framework/Setup/Declaration/Schema/SchemaConfig.php b/lib/internal/Magento/Framework/Setup/Declaration/Schema/SchemaConfig.php index 8d0ed08eea290..4cd90cb35b236 100644 --- a/lib/internal/Magento/Framework/Setup/Declaration/Schema/SchemaConfig.php +++ b/lib/internal/Magento/Framework/Setup/Declaration/Schema/SchemaConfig.php @@ -62,17 +62,8 @@ public function __construct( */ public function getDbConfig() { - $declarativeSchema = $this->getDeclarationConfig(); - $tablesWithJsonTypeField = []; - foreach ($declarativeSchema->getTables() as $table) { - foreach ($table->getColumns() as $column) { - if ($column->getType() == 'json') { - $tablesWithJsonTypeField[$table->getName()] = $column->getName(); - } - } - } $schema = $this->schemaFactory->create(); - $schema = $this->dbSchemaBuilder->build($schema, $tablesWithJsonTypeField); + $schema = $this->dbSchemaBuilder->build($schema); return $schema; }