Skip to content

Commit e508d4a

Browse files
committed
AC-1913::Fixed Unable to apply data patch error on running upgrade
1 parent 8a0b919 commit e508d4a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/code/Magento/Catalog/Setup/Patch/Data/UpdateMultiselectAttributesBackendTypes.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ public function getAliases()
5959
public function apply()
6060
{
6161
$this->dataSetup->startSetup();
62+
$setup = $this->dataSetup;
63+
$connection = $setup->getConnection();
6264

63-
$connection = $this->dataSetup->getConnection();
64-
$attributeTable = $connection->getTableName('eav_attribute');
65+
$attributeTable = $setup->getTable('eav_attribute');
6566
/** @var EavSetup $eavSetup */
6667
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->dataSetup]);
6768
$entityTypeId = $eavSetup->getEntityTypeId(Product::ENTITY);
@@ -74,8 +75,8 @@ public function apply()
7475
->where('frontend_input = ?', 'multiselect')
7576
);
7677

77-
$varcharTable = $connection->getTableName('catalog_product_entity_varchar');
78-
$textTable = $connection->getTableName('catalog_product_entity_text');
78+
$varcharTable = $setup->getTable('catalog_product_entity_varchar');
79+
$textTable = $setup->getTable('catalog_product_entity_text');
7980
$varcharTableDataSql = $connection
8081
->select()
8182
->from($varcharTable)

0 commit comments

Comments
 (0)