Skip to content

Commit 5c912d6

Browse files
Modified the solution against the build failure
1 parent d13594d commit 5c912d6

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

app/code/Magento/CatalogRule/Setup/Patch/Schema/CleanUpProductPriceReplicaTable.php

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,37 @@
66

77
namespace Magento\CatalogRule\Setup\Patch\Schema;
88

9-
use Magento\Framework\Setup\ModuleDataSetupInterface;
9+
use Magento\Framework\Setup\SchemaSetupInterface;
1010
use Magento\Framework\Setup\Patch\SchemaPatchInterface;
1111

12+
/**
13+
* Class CleanUpProductPriceReplicaTable
14+
*
15+
*/
1216
class CleanUpProductPriceReplicaTable implements SchemaPatchInterface
1317
{
14-
/** @var ModuleDataSetupInterface */
15-
private ModuleDataSetupInterface $moduleDataSetup;
18+
/**
19+
* @var SchemaSetupInterface
20+
*/
21+
private SchemaSetupInterface $schemaSetup;
1622

1723
/**
18-
* @param ModuleDataSetupInterface $moduleDataSetup
24+
* CleanUpProductPriceReplicaTable constructor.
25+
* @param SchemaSetupInterface $schemaSetup
1926
*/
2027
public function __construct(
21-
ModuleDataSetupInterface $moduleDataSetup
28+
SchemaSetupInterface $schemaSetup
2229
) {
23-
$this->moduleDataSetup = $moduleDataSetup;
30+
$this->schemaSetup = $schemaSetup;
2431
}
2532

2633
/**
2734
* @inheritDoc
2835
*/
2936
public function apply(): void
3037
{
31-
$connection = $this->moduleDataSetup->getConnection();
32-
$connection->startSetup();
38+
$connection = $this->schemaSetup->startSetup();
39+
$connection = $this->schemaSetup->getConnection();
3340

3441
// There was a bug which caused the catalogrule_product_price_replica
3542
// table to become unnecessarily large. The bug causing the growth has

0 commit comments

Comments
 (0)