Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bill-to Name and Ship-to Name trancated to 20 characters in backend
Compared the lengths of firstname, middlename and lastname of table "quote_address" with those of "quote" (255, 40 and 255 resp.) and of "sales_order_address" (255, 255 and 255) and with sales_order (128, 128 and 128) and choose to go with 255, 40 and 255 since these are used in "quote" as well and these are the values I know from Magento 1.9 as well. The other values are a bit inconsistent. Tested.
  • Loading branch information
SolsWebdesign committed May 16, 2017
1 parent 7201bc0 commit e18479e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions app/code/Magento/Quote/Setup/UpgradeSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,43 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
]
);
}

if (version_compare($context->getVersion(), '2.0.2', '<')) {
$setup->getConnection(self::$connectionName)->changeColumn(
$setup->getTable('quote_address', self::$connectionName),
'firstname',
'firstname',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
'length' => 255,
'comment' => 'Firstname'
]
);
}
if (version_compare($context->getVersion(), '2.0.2', '<')) {
$setup->getConnection(self::$connectionName)->changeColumn(
$setup->getTable('quote_address', self::$connectionName),
'middlename',
'middlename',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
'length' => 40,
'comment' => 'Middlename'
]
);
}
if (version_compare($context->getVersion(), '2.0.2', '<')) {
$setup->getConnection(self::$connectionName)->changeColumn(
$setup->getTable('quote_address', self::$connectionName),
'lastname',
'lastname',
[
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
'length' => 255,
'comment' => 'Lastname'
]
);
}
//drop foreign key for single DB case
if (version_compare($context->getVersion(), '2.0.3', '<')
&& $setup->tableExists($setup->getTable('quote_item'))
Expand Down

0 comments on commit e18479e

Please sign in to comment.