We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 164a2b06 authored by Rik ter Beek's avatar Rik ter Beek

Fixes #106 Change smallInt to integer for adyen_notification enitty_id column...

Fixes #106 Change smallInt to integer for adyen_notification enitty_id column and update version so upgrade script is called
parent f4fbd8b7
......@@ -34,7 +34,6 @@ use Magento\Framework\Setup\SchemaSetupInterface;
class UpgradeSchema implements UpgradeSchemaInterface
{
const ADYEN_ORDER_PAYMENT = 'adyen_order_payment';
/**
......@@ -56,11 +55,18 @@ class UpgradeSchema implements UpgradeSchemaInterface
$this->updateSchemaVersion200($setup);
}
if (version_compare($context->getVersion(), '2.0.4', '<')) {
$this->updateSchemaVersion204($setup);
}
$setup->endSetup();
}
/**
* Upgrade to 1.0.0.1
*
* @param SchemaSetupInterface $setup
* @return void
*/
public function updateSchemaVersion1001(SchemaSetupInterface $setup)
{
......@@ -92,7 +98,10 @@ class UpgradeSchema implements UpgradeSchemaInterface
}
/**
* Upgrade to 1.0.0.2
*
* @param SchemaSetupInterface $setup
* @return void
*/
public function updateSchemaVersion1002(SchemaSetupInterface $setup)
{
......@@ -110,7 +119,10 @@ class UpgradeSchema implements UpgradeSchemaInterface
}
/**
* Upgrade to 2.0.0
*
* @param SchemaSetupInterface $setup
* @return void
*/
public function updateSchemaVersion200(SchemaSetupInterface $setup)
{
......@@ -224,4 +236,30 @@ class UpgradeSchema implements UpgradeSchemaInterface
);
}
/**
* Upgrade to 2.0.4
* Update entity_id in notification from smallint to integer
*
* @param SchemaSetupInterface $setup
* @return void
*/
public function updateSchemaVersion204(SchemaSetupInterface $setup)
{
$connection = $setup->getConnection();
$tableName = $setup->getTable('adyen_notification');
$connection->changeColumn(
$tableName,
'entity_id',
'entity_id',
[
'type' => Table::TYPE_INTEGER,
'nullable' => false,
'primary' => true,
'identity' => true,
'unsigned' => true,
'comment' => 'Adyen Notification Entity ID'
]
);
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
"name": "adyen/module-payment",
"description": "Official Magento2 Plugin to connect to Payment Service Provider Adyen.",
"type": "magento2-module",
"version": "2.0.3",
"version": "2.0.4",
"license": [
"OSL-3.0",
"AFL-3.0"
......
......@@ -24,7 +24,7 @@
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Adyen_Payment" setup_version="2.0.3">
<module name="Adyen_Payment" setup_version="2.0.4">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Quote"/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment