Skip to content

Commit 9958d72

Browse files
committed
ACP2E-3709: [Cloud] Changing table column type from Int to Decimal using db_schema.xml file In Magento 2 Results In Errors
1 parent 653be88 commit 9958d72

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/internal/Magento/Framework/Config/Dom.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,10 @@ protected function _mergeNode(\DOMElement $node, $parentPath)
171171
/* Update matched node attributes and value */
172172
if ($matchedNode) {
173173
//different node type
174-
if (($this->typeAttributeName &&
174+
if ($this->typeAttributeName &&
175175
$node->hasAttribute($this->typeAttributeName) &&
176176
$matchedNode->hasAttribute($this->typeAttributeName) &&
177-
$node->getAttribute($this->typeAttributeName) !== $matchedNode->getAttribute($this->typeAttributeName))
178-
|| ($node->tagName === 'column')
177+
$node->getAttribute($this->typeAttributeName) !== $matchedNode->getAttribute($this->typeAttributeName)
179178
) {
180179
$parentMatchedNode = $this->_getMatchedNode($parentPath);
181180
$newNode = $this->dom->importNode($node, true);

lib/internal/Magento/Framework/Config/Reader/Filesystem.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Framework\Config\Reader;
@@ -81,6 +81,11 @@ class Filesystem implements \Magento\Framework\Config\ReaderInterface
8181
*/
8282
protected $_schemaFile;
8383

84+
/**
85+
* Name of an attribute that stands for data type of node values
86+
*/
87+
public const TYPE_ATTRIBUTE = 'xsi:type';
88+
8489
/**
8590
* Constructor
8691
*
@@ -210,7 +215,7 @@ protected function _createConfigMerger($mergerClass, $initialContents)
210215
$initialContents,
211216
$this->validationState,
212217
$this->_idAttributes,
213-
null,
218+
self::TYPE_ATTRIBUTE,
214219
$this->_perFileSchema
215220
);
216221
if (!$result instanceof \Magento\Framework\Config\Dom) {

0 commit comments

Comments
 (0)