-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from mageplaza/develop
Performance improvement
- Loading branch information
Showing
3 changed files
with
62 additions
and
44 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,65 +1,80 @@ | ||
<?php | ||
/** | ||
* Mageplaza | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the mageplaza.com license that is | ||
* available through the world-wide-web at this URL: | ||
* https://mageplaza.com/LICENSE.txt | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this extension to newer | ||
* version in the future. | ||
* | ||
* @category Mageplaza | ||
* @package Mageplaza_Smtp | ||
* @copyright Copyright (c) 2017 Mageplaza (https://www.mageplaza.com/) | ||
* @license http://mageplaza.com/LICENSE.txt | ||
*/ | ||
|
||
namespace Mageplaza\Smtp\Setup; | ||
|
||
use Magento\Framework\DB\Ddl\Table; | ||
use Magento\Framework\Setup\UpgradeSchemaInterface; | ||
use Magento\Framework\Setup\SchemaSetupInterface; | ||
use Magento\Framework\Setup\ModuleContextInterface; | ||
use Magento\Framework\Setup\SchemaSetupInterface; | ||
use Magento\Framework\Setup\UpgradeSchemaInterface; | ||
|
||
/** | ||
* Class UpgradeSchema | ||
* @package Mageplaza\SeoRule\Setup | ||
* @package Mageplaza\Smtp\Setup | ||
*/ | ||
class UpgradeSchema implements UpgradeSchemaInterface | ||
{ | ||
/** | ||
* @param \Magento\Framework\Setup\SchemaSetupInterface $setup | ||
* @param \Magento\Framework\Setup\ModuleContextInterface $context | ||
*/ | ||
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context) | ||
{ | ||
$setup->startSetup(); | ||
|
||
/** | ||
* @param \Magento\Framework\Setup\SchemaSetupInterface $setup | ||
* @param \Magento\Framework\Setup\ModuleContextInterface $context | ||
*/ | ||
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context) | ||
{ | ||
$setup->startSetup(); | ||
|
||
if( version_compare($context->getVersion(), '1.1.0', '<' )){ | ||
if (version_compare($context->getVersion(), '1.1.0', '<')) { | ||
$setup->getConnection() | ||
->addColumn($setup->getTable('mageplaza_smtp_log'), 'from', [ | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Sender' | ||
] | ||
); | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Sender' | ||
] | ||
); | ||
$setup->getConnection() | ||
->addColumn($setup->getTable('mageplaza_smtp_log'), 'to', [ | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Recipient' | ||
] | ||
); | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Recipient' | ||
] | ||
); | ||
$setup->getConnection() | ||
->addColumn($setup->getTable('mageplaza_smtp_log'), 'cc', [ | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Cc' | ||
] | ||
); | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Cc' | ||
] | ||
); | ||
$setup->getConnection() | ||
->addColumn($setup->getTable('mageplaza_smtp_log'), 'bcc', [ | ||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Bcc' | ||
] | ||
); | ||
} | ||
|
||
$setup->endSetup(); | ||
} | ||
|
||
|
||
'type' => Table::TYPE_TEXT, | ||
'nullable' => true, | ||
'length' => 255, | ||
'comment' => 'Bcc' | ||
] | ||
); | ||
} | ||
|
||
$setup->endSetup(); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"description": "SMTP Extension for Magento 2 helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers", | ||
"license": "Mageplaza License", | ||
"type": "magento2-module", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"authors": [ | ||
{ | ||
"email": "[email protected]", | ||
|
@@ -14,7 +14,7 @@ | |
], | ||
"minimum-stability": "dev", | ||
"require": { | ||
"mageplaza/module-core": "*" | ||
"mageplaza/module-core": "^1.3.7" | ||
}, | ||
"keywords": [ | ||
"magento 2", | ||
|
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