Skip to content

Commit ec29630

Browse files
committed
Merge branch 'develop' into MAGETWO-59074
2 parents ccef5cd + 0c6227d commit ec29630

File tree

46 files changed

+670
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+670
-110
lines changed

app/code/Magento/Bundle/Setup/InstallSchema.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
2424
$installer = $setup;
2525

2626
$installer->startSetup();
27-
27+
$customerGroupTable = $setup->getConnection()->describeTable($setup->getTable('customer_group'));
28+
$customerGroupIdType = $customerGroupTable['customer_group_id']['DATA_TYPE'] == 'int'
29+
? \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER : $customerGroupTable['customer_group_id']['DATA_TYPE'];
2830
/**
2931
* Create table 'catalog_product_bundle_option'
3032
*/
@@ -340,7 +342,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
340342
)
341343
->addColumn(
342344
'customer_group_id',
343-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
345+
$customerGroupIdType,
344346
null,
345347
['unsigned' => true, 'nullable' => false, 'primary' => true],
346348
'Customer Group Id'

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

100644100755
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
4444
}
4545
}
4646

47+
if (version_compare($context->getVersion(), '2.0.3', '<')) {
48+
$tables = [
49+
'catalog_product_index_price_bundle_idx',
50+
'catalog_product_index_price_bundle_opt_idx',
51+
'catalog_product_index_price_bundle_opt_tmp',
52+
'catalog_product_index_price_bundle_sel_idx',
53+
'catalog_product_index_price_bundle_sel_tmp',
54+
'catalog_product_index_price_bundle_tmp',
55+
];
56+
foreach ($tables as $table) {
57+
$setup->getConnection()->modifyColumn(
58+
$setup->getTable($table),
59+
'customer_group_id',
60+
['type' => 'integer', 'nullable' => false]
61+
);
62+
}
63+
}
64+
4765
$setup->endSetup();
4866
}
4967
}

app/code/Magento/Bundle/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Bundle" setup_version="2.0.2">
9+
<module name="Magento_Bundle" setup_version="2.0.3">
1010
<sequence>
1111
<module name="Magento_Catalog"/>
1212
</sequence>

app/code/Magento/Catalog/Setup/InstallSchema.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,6 +1853,9 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
18531853
$installer->getConnection()
18541854
->createTable($table);
18551855

1856+
$customerGroupTable = $setup->getConnection()->describeTable($setup->getTable('customer_group'));
1857+
$customerGroupIdType = $customerGroupTable['customer_group_id']['DATA_TYPE'] == 'int'
1858+
? \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER : $customerGroupTable['customer_group_id']['DATA_TYPE'];
18561859
/**
18571860
* Create table 'catalog_product_entity_tier_price'
18581861
*/
@@ -1883,7 +1886,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
18831886
)
18841887
->addColumn(
18851888
'customer_group_id',
1886-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
1889+
$customerGroupIdType,
18871890
null,
18881891
['unsigned' => true, 'nullable' => false, 'default' => '0'],
18891892
'Customer Group ID'
@@ -2937,7 +2940,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
29372940
)
29382941
->addColumn(
29392942
'customer_group_id',
2940-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
2943+
$customerGroupIdType,
29412944
null,
29422945
['unsigned' => true, 'nullable' => false, 'primary' => true],
29432946
'Customer Group ID'
@@ -3056,7 +3059,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
30563059
)
30573060
->addColumn(
30583061
'customer_group_id',
3059-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
3062+
$customerGroupIdType,
30603063
null,
30613064
['unsigned' => true, 'nullable' => false, 'primary' => true],
30623065
'Customer Group ID'

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

100644100755
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,31 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
3636
if (version_compare($context->getVersion(), '2.1.0', '<')) {
3737
$this->addPercentageValueColumn($setup);
3838
}
39+
40+
if (version_compare($context->getVersion(), '2.1.1', '<')) {
41+
$tables = [
42+
'catalog_product_index_price_cfg_opt_agr_idx',
43+
'catalog_product_index_price_cfg_opt_agr_tmp',
44+
'catalog_product_index_price_cfg_opt_idx',
45+
'catalog_product_index_price_cfg_opt_tmp',
46+
'catalog_product_index_price_final_idx',
47+
'catalog_product_index_price_final_tmp',
48+
'catalog_product_index_price_idx',
49+
'catalog_product_index_price_opt_agr_idx',
50+
'catalog_product_index_price_opt_agr_tmp',
51+
'catalog_product_index_price_opt_idx',
52+
'catalog_product_index_price_opt_tmp',
53+
'catalog_product_index_price_tmp',
54+
];
55+
foreach ($tables as $table) {
56+
$setup->getConnection()->modifyColumn(
57+
$setup->getTable($table),
58+
'customer_group_id',
59+
['type' => 'integer', 'nullable' => false]
60+
);
61+
}
62+
}
63+
3964
$setup->endSetup();
4065
}
4166

app/code/Magento/Catalog/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_Catalog" setup_version="2.1.0">
9+
<module name="Magento_Catalog" setup_version="2.1.1">
1010
<sequence>
1111
<module name="Magento_Eav"/>
1212
<module name="Magento_Cms"/>

app/code/Magento/CatalogRule/Setup/InstallSchema.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
2525

2626
$installer->startSetup();
2727

28+
$customerGroupTable = $setup->getConnection()->describeTable($setup->getTable('customer_group'));
29+
$customerGroupIdType = $customerGroupTable['customer_group_id']['DATA_TYPE'] == 'int'
30+
? \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER : $customerGroupTable['customer_group_id']['DATA_TYPE'];
2831
/**
2932
* Create table 'catalogrule'
3033
*/
@@ -372,7 +375,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
372375
)
373376
->addColumn(
374377
'customer_group_id',
375-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
378+
$customerGroupIdType,
376379
null,
377380
['unsigned' => true, 'nullable' => false, 'primary' => true, 'default' => '0'],
378381
'Customer Group Id'
@@ -477,7 +480,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con
477480
)
478481
->addColumn(
479482
'customer_group_id',
480-
\Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT,
483+
$customerGroupIdType,
481484
null,
482485
['unsigned' => true, 'nullable' => false, 'primary' => true],
483486
'Customer Group Id'

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,20 @@ public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $con
2626
$this->removeSubProductDiscounts($setup);
2727
}
2828

29+
if (version_compare($context->getVersion(), '2.0.2', '<')) {
30+
$tables = [
31+
'catalogrule_product',
32+
'catalogrule_product_price',
33+
];
34+
foreach ($tables as $table) {
35+
$setup->getConnection()->modifyColumn(
36+
$setup->getTable($table),
37+
'customer_group_id',
38+
['type' => 'integer']
39+
);
40+
}
41+
}
42+
2943
$setup->endSetup();
3044
}
3145

app/code/Magento/CatalogRule/etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9-
<module name="Magento_CatalogRule" setup_version="2.0.1">
9+
<module name="Magento_CatalogRule" setup_version="2.0.2">
1010
<sequence>
1111
<module name="Magento_Rule"/>
1212
<module name="Magento_Catalog"/>

app/code/Magento/Customer/Block/Account/AuthorizationLink.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66
namespace Magento\Customer\Block\Account;
77

88
use Magento\Customer\Model\Context;
9+
use Magento\Customer\Block\Account\SortLinkInterface;
910

1011
/**
1112
* Customer authorization link
1213
*
1314
* @SuppressWarnings(PHPMD.DepthOfInheritance)
1415
*/
15-
class AuthorizationLink extends \Magento\Framework\View\Element\Html\Link
16+
class AuthorizationLink extends \Magento\Framework\View\Element\Html\Link implements SortLinkInterface
1617
{
1718
/**
1819
* Customer session
@@ -88,4 +89,12 @@ public function isLoggedIn()
8889
{
8990
return $this->httpContext->getValue(Context::CONTEXT_AUTH);
9091
}
92+
93+
/**
94+
* {@inheritdoc}
95+
*/
96+
public function getSortOrder()
97+
{
98+
return $this->getData(self::SORT_ORDER);
99+
}
91100
}

0 commit comments

Comments
 (0)