-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Pavel Bystritsky <[email protected]>
- Loading branch information
1 parent
d09a2f5
commit b06d1ba
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
64 changes: 64 additions & 0 deletions
64
Setup/Patch/Data/AddLifeElementsValidationValueFixPatch.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bold\Checkout\Setup\Patch\Data; | ||
|
||
use Magento\Framework\Setup\ModuleDataSetupInterface; | ||
use Magento\Framework\Setup\Patch\DataPatchInterface; | ||
|
||
/** | ||
* Perform Life elements upgrade - fix. | ||
*/ | ||
class AddLifeElementsValidationValueFixPatch implements DataPatchInterface | ||
{ | ||
/** | ||
* @var ModuleDataSetupInterface | ||
*/ | ||
private $moduleDataSetup; | ||
|
||
/** | ||
* @param ModuleDataSetupInterface $moduleDataSetup | ||
*/ | ||
public function __construct( | ||
ModuleDataSetupInterface $moduleDataSetup | ||
) { | ||
$this->moduleDataSetup = $moduleDataSetup; | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public static function getDependencies() | ||
{ | ||
return [AddLifeElementsValidationValuePatch::class]; | ||
} | ||
|
||
/** | ||
* Perform Life elements upgrade - fix. | ||
* | ||
* @return void | ||
*/ | ||
public function apply(): void | ||
{ | ||
$this->moduleDataSetup->startSetup(); | ||
|
||
$connection = $this->moduleDataSetup->getConnection(); | ||
$connection->delete( | ||
$connection->getTableName('core_config_data'), | ||
[ | ||
'path = ?' => 'general', | ||
] | ||
); | ||
|
||
$this->moduleDataSetup->endSetup(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public function getAliases() | ||
{ | ||
return []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters