|
6 | 6 |
|
7 | 7 | namespace Magento\CatalogRule\Setup\Patch\Schema;
|
8 | 8 |
|
9 |
| -use Magento\Framework\Setup\ModuleDataSetupInterface; |
| 9 | +use Magento\Framework\Setup\SchemaSetupInterface; |
10 | 10 | use Magento\Framework\Setup\Patch\SchemaPatchInterface;
|
11 | 11 |
|
| 12 | +/** |
| 13 | + * Class CleanUpProductPriceReplicaTable |
| 14 | + * |
| 15 | + */ |
12 | 16 | class CleanUpProductPriceReplicaTable implements SchemaPatchInterface
|
13 | 17 | {
|
14 |
| - /** @var ModuleDataSetupInterface */ |
15 |
| - private ModuleDataSetupInterface $moduleDataSetup; |
| 18 | + /** |
| 19 | + * @var SchemaSetupInterface |
| 20 | + */ |
| 21 | + private SchemaSetupInterface $schemaSetup; |
16 | 22 |
|
17 | 23 | /**
|
18 |
| - * @param ModuleDataSetupInterface $moduleDataSetup |
| 24 | + * CleanUpProductPriceReplicaTable constructor. |
| 25 | + * @param SchemaSetupInterface $schemaSetup |
19 | 26 | */
|
20 | 27 | public function __construct(
|
21 |
| - ModuleDataSetupInterface $moduleDataSetup |
| 28 | + SchemaSetupInterface $schemaSetup |
22 | 29 | ) {
|
23 |
| - $this->moduleDataSetup = $moduleDataSetup; |
| 30 | + $this->schemaSetup = $schemaSetup; |
24 | 31 | }
|
25 | 32 |
|
26 | 33 | /**
|
27 | 34 | * @inheritDoc
|
28 | 35 | */
|
29 | 36 | public function apply(): void
|
30 | 37 | {
|
31 |
| - $connection = $this->moduleDataSetup->getConnection(); |
32 |
| - $connection->startSetup(); |
| 38 | + $connection = $this->schemaSetup->startSetup(); |
| 39 | + $connection = $this->schemaSetup->getConnection(); |
33 | 40 |
|
34 | 41 | // There was a bug which caused the catalogrule_product_price_replica
|
35 | 42 | // table to become unnecessarily large. The bug causing the growth has
|
|
0 commit comments