Skip to content
Snippets Groups Projects
Commit f281e06e authored by Ievgen Shakhsuvarov's avatar Ievgen Shakhsuvarov Committed by GitHub
Browse files

MAGETWO-86434: [Backport to 2.2-develop] The quote address fields length...

MAGETWO-86434: [Backport to 2.2-develop] The quote address fields length expanded in the database #13015
parents 49dcdeeb 0fb55351
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
namespace Magento\Quote\Setup; namespace Magento\Quote\Setup;
use Magento\Framework\DB\Ddl\Table;
use Magento\Framework\Setup\UpgradeSchemaInterface; use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\Setup\SchemaSetupInterface;
...@@ -40,7 +41,7 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -40,7 +41,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
'street', 'street',
'street', 'street',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'type' => Table::TYPE_TEXT,
'length' => 255, 'length' => 255,
'comment' => 'Street' 'comment' => 'Street'
] ]
...@@ -61,7 +62,7 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -61,7 +62,7 @@ class UpgradeSchema implements UpgradeSchemaInterface
$setup->getTable('quote_address', self::$connectionName), $setup->getTable('quote_address', self::$connectionName),
'shipping_method', 'shipping_method',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'type' => Table::TYPE_TEXT,
'length' => 120 'length' => 120
] ]
); );
...@@ -72,33 +73,53 @@ class UpgradeSchema implements UpgradeSchemaInterface ...@@ -72,33 +73,53 @@ class UpgradeSchema implements UpgradeSchemaInterface
$setup->getTable('quote_address', self::$connectionName), $setup->getTable('quote_address', self::$connectionName),
'firstname', 'firstname',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'type' => Table::TYPE_TEXT,
'length' => 255, 'length' => 255,
] ]
)->modifyColumn( )->modifyColumn(
$setup->getTable('quote_address', self::$connectionName), $setup->getTable('quote_address', self::$connectionName),
'middlename', 'middlename',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'type' => Table::TYPE_TEXT,
'length' => 40, 'length' => 40,
] ]
)->modifyColumn( )->modifyColumn(
$setup->getTable('quote_address', self::$connectionName), $setup->getTable('quote_address', self::$connectionName),
'lastname', 'lastname',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, 'type' => Table::TYPE_TEXT,
'length' => 255, 'length' => 255,
] ]
)->modifyColumn( )->modifyColumn(
$setup->getTable('quote', self::$connectionName), $setup->getTable('quote', self::$connectionName),
'updated_at', 'updated_at',
[ [
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TIMESTAMP, 'type' => Table::TYPE_TIMESTAMP,
'nullable' => false, 'nullable' => false,
'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT_UPDATE, 'default' => Table::TIMESTAMP_INIT_UPDATE,
] ]
); );
} }
if (version_compare($context->getVersion(), '2.0.7', '<')) {
$connection = $setup->getConnection(self::$connectionName);
$connection->modifyColumn(
$setup->getTable('quote_address', self::$connectionName),
'telephone',
['type' => Table::TYPE_TEXT, 'length' => 255]
)->modifyColumn(
$setup->getTable('quote_address', self::$connectionName),
'fax',
['type' => Table::TYPE_TEXT, 'length' => 255]
)->modifyColumn(
$setup->getTable('quote_address', self::$connectionName),
'region',
['type' => Table::TYPE_TEXT, 'length' => 255]
)->modifyColumn(
$setup->getTable('quote_address', self::$connectionName),
'city',
['type' => Table::TYPE_TEXT, 'length' => 255]
);
}
$setup->endSetup(); $setup->endSetup();
} }
} }
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
*/ */
--> -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Magento_Quote" setup_version="2.0.6"> <module name="Magento_Quote" setup_version="2.0.7">
</module> </module>
</config> </config>
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