Skip to content

Commit 7b7b9ff

Browse files
SolsWebdesignlazyguru
authored andcommitted
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.
1 parent 7026628 commit 7b7b9ff

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

app/code/Magento/Quote/Setup/UpgradeSchema.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,43 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
4646
]
4747
);
4848
}
49+
50+
if (version_compare($context->getVersion(), '2.0.2', '<')) {
51+
$setup->getConnection(self::$connectionName)->changeColumn(
52+
$setup->getTable('quote_address', self::$connectionName),
53+
'firstname',
54+
'firstname',
55+
[
56+
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
57+
'length' => 255,
58+
'comment' => 'Firstname'
59+
]
60+
);
61+
}
62+
if (version_compare($context->getVersion(), '2.0.2', '<')) {
63+
$setup->getConnection(self::$connectionName)->changeColumn(
64+
$setup->getTable('quote_address', self::$connectionName),
65+
'middlename',
66+
'middlename',
67+
[
68+
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
69+
'length' => 40,
70+
'comment' => 'Middlename'
71+
]
72+
);
73+
}
74+
if (version_compare($context->getVersion(), '2.0.2', '<')) {
75+
$setup->getConnection(self::$connectionName)->changeColumn(
76+
$setup->getTable('quote_address', self::$connectionName),
77+
'lastname',
78+
'lastname',
79+
[
80+
'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
81+
'length' => 255,
82+
'comment' => 'Lastname'
83+
]
84+
);
85+
}
4986
//drop foreign key for single DB case
5087
if (version_compare($context->getVersion(), '2.0.3', '<')
5188
&& $setup->tableExists($setup->getTable('quote_item'))

0 commit comments

Comments
 (0)