-
Notifications
You must be signed in to change notification settings - Fork 13
/
UpgradeData.php
48 lines (44 loc) · 1.39 KB
/
UpgradeData.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
/**
* KiwiCommerce
*
* Do not edit or add to this file if you wish to upgrade to newer versions in the future.
* If you wish to customise this module for your needs.
* Please contact us https://kiwicommerce.co.uk/contacts.
*
* @category KiwiCommerce
* @package KiwiCommerce_EnhancedSMTP
* @copyright Copyright (C) 2018 Kiwi Commerce Ltd (https://kiwicommerce.co.uk/)
* @license https://kiwicommerce.co.uk/magento2-extension-license/
*/
namespace KiwiCommerce\EnhancedSMTP\Setup;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
/**
* Class UpgradeData
* @package KiwiCommerce\EnhancedSMTP\Setup
*/
class UpgradeData implements UpgradeDataInterface
{
/**
* Module upgrade data code
*
* @param ModuleDataSetupInterface $setup
* @param ModuleContextInterface $context
*/
public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
{
$installer = $setup;
$installer->startSetup();
$data = [
'scope' => 'default',
'scope_id' => 0,
'path' => 'enhancedsmtp/custom/failed_count',
'value' => 0,
];
$setup->getConnection()
->insertOnDuplicate($setup->getTable('core_config_data'), $data);
$installer->endSetup();
}
}