Skip to content

Commit 07c2590

Browse files
author
Sergii Kovalenko
authored
Merge pull request #2413 from magento-trigger/MAGETWO-89402
- [MAGETWO-89009] Split database doesn't work on 2.3-develop - [MAGETWO-89401] Make tables renaming possible - [MAGETWO-89404] Schema revert bug - [MAGETWO-89402] Make 'db:status' command works properly - [MAGETWO-90640] Invalid charset during installation - [MAGETWO-90640] Make split db test working on L2 on bamboo - [MAGETWO-90684] Upgrade fails if DB contains view - [MAGETWO-90942] Couldnt edit order from admin with enabled split db
2 parents 52dc0e2 + fe002db commit 07c2590

File tree

79 files changed

+1678
-578
lines changed

Some content is hidden

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

79 files changed

+1678
-578
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1639,7 +1639,7 @@
16391639
<column name="product_id"/>
16401640
<column name="store_id"/>
16411641
</constraint>
1642-
<index name="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="btree">
1642+
<index name="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="hash">
16431643
<column name="product_id"/>
16441644
<column name="category_id"/>
16451645
<column name="store_id"/>

app/code/Magento/GiftMessage/etc/db_schema.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
<column name="gift_message_id"/>
2020
</constraint>
2121
</table>
22-
<table name="quote" resource="quote" comment="Sales Flat Quote">
22+
<table name="quote" resource="checkout" comment="Sales Flat Quote">
2323
<column xsi:type="int" name="gift_message_id" padding="11" unsigned="false" nullable="true" identity="false"
2424
comment="Gift Message Id"/>
2525
</table>
26-
<table name="quote_address" resource="quote" comment="Sales Flat Quote Address">
26+
<table name="quote_address" resource="checkout" comment="Sales Flat Quote Address">
2727
<column xsi:type="int" name="gift_message_id" padding="11" unsigned="false" nullable="true" identity="false"
2828
comment="Gift Message Id"/>
2929
</table>
30-
<table name="quote_item" resource="quote" comment="Sales Flat Quote Item">
30+
<table name="quote_item" resource="checkout" comment="Sales Flat Quote Item">
3131
<column xsi:type="int" name="gift_message_id" padding="11" unsigned="false" nullable="true" identity="false"
3232
comment="Gift Message Id"/>
3333
</table>
34-
<table name="quote_address_item" resource="quote" comment="Sales Flat Quote Address Item">
34+
<table name="quote_address_item" resource="checkout" comment="Sales Flat Quote Address Item">
3535
<column xsi:type="int" name="gift_message_id" padding="11" unsigned="false" nullable="true" identity="false"
3636
comment="Gift Message Id"/>
3737
</table>

app/code/Magento/OfflineShipping/etc/db_schema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
<column xsi:type="smallint" name="free_shipping" padding="5" unsigned="true" nullable="false" identity="false"
4646
default="0" comment="Free Shipping"/>
4747
</table>
48-
<table name="quote_address" resource="quote" comment="Sales Flat Quote Address">
48+
<table name="quote_address" resource="checkout" comment="Sales Flat Quote Address">
4949
<column xsi:type="smallint" name="free_shipping" padding="5" unsigned="true" nullable="false" identity="false"
5050
default="0" comment="Free Shipping"/>
5151
</table>
52-
<table name="quote_item" resource="quote" comment="Sales Flat Quote Item">
52+
<table name="quote_item" resource="checkout" comment="Sales Flat Quote Item">
5353
<column xsi:type="smallint" name="free_shipping" padding="5" unsigned="true" nullable="false" identity="false"
5454
default="0" comment="Free Shipping"/>
5555
</table>
56-
<table name="quote_address_item" resource="quote" comment="Sales Flat Quote Address Item">
56+
<table name="quote_address_item" resource="checkout" comment="Sales Flat Quote Address Item">
5757
<column xsi:type="int" name="free_shipping" padding="10" unsigned="true" nullable="true" identity="false"
5858
comment="Free Shipping"/>
5959
</table>

app/code/Magento/Paypal/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
<column name="txn_id"/>
146146
</constraint>
147147
</table>
148-
<table name="quote_payment" resource="quote" comment="Sales Flat Quote Payment">
148+
<table name="quote_payment" resource="checkout" comment="Sales Flat Quote Payment">
149149
<column xsi:type="varchar" name="paypal_payer_id" nullable="true" length="255" comment="Paypal Payer Id"/>
150150
<column xsi:type="varchar" name="paypal_payer_status" nullable="true" length="255"
151151
comment="Paypal Payer Status"/>

app/code/Magento/Persistent/etc/db_schema.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<column name="updated_at"/>
3838
</index>
3939
</table>
40-
<table name="quote" resource="quote" comment="Sales Flat Quote">
40+
<table name="quote" resource="checkout" comment="Sales Flat Quote">
4141
<column xsi:type="smallint" name="is_persistent" padding="5" unsigned="true" nullable="true" identity="false"
4242
default="0" comment="Is Quote Persistent"/>
4343
</table>

app/code/Magento/Quote/Model/ResourceModel/Quote.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function getReservedOrderId($quote)
180180
public function isOrderIncrementIdUsed($orderIncrementId)
181181
{
182182
/** @var \Magento\Framework\DB\Adapter\AdapterInterface $adapter */
183-
$adapter = $this->getConnection();
183+
$adapter = $this->_resources->getConnection('sales');
184184
$bind = [':increment_id' => $orderIncrementId];
185185
/** @var \Magento\Framework\DB\Select $select */
186186
$select = $adapter->select();

app/code/Magento/Quote/etc/db_schema.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
10-
<table name="quote" resource="quote" engine="innodb" comment="Sales Flat Quote">
10+
<table name="quote" resource="checkout" engine="innodb" comment="Sales Flat Quote">
1111
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
1212
comment="Entity Id"/>
1313
<column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
@@ -101,7 +101,7 @@
101101
<column name="store_id"/>
102102
</index>
103103
</table>
104-
<table name="quote_address" resource="quote" engine="innodb" comment="Sales Flat Quote Address">
104+
<table name="quote_address" resource="checkout" engine="innodb" comment="Sales Flat Quote Address">
105105
<column xsi:type="int" name="address_id" padding="10" unsigned="true" nullable="false" identity="true"
106106
comment="Address Id"/>
107107
<column xsi:type="int" name="quote_id" padding="10" unsigned="true" nullable="false" identity="false"
@@ -211,7 +211,7 @@
211211
<column name="quote_id"/>
212212
</index>
213213
</table>
214-
<table name="quote_item" resource="quote" engine="innodb" comment="Sales Flat Quote Item">
214+
<table name="quote_item" resource="checkout" engine="innodb" comment="Sales Flat Quote Item">
215215
<column xsi:type="int" name="item_id" padding="10" unsigned="true" nullable="false" identity="true"
216216
comment="Item Id"/>
217217
<column xsi:type="int" name="quote_id" padding="10" unsigned="true" nullable="false" identity="false"
@@ -311,7 +311,7 @@
311311
<column name="store_id"/>
312312
</index>
313313
</table>
314-
<table name="quote_address_item" resource="quote" engine="innodb" comment="Sales Flat Quote Address Item">
314+
<table name="quote_address_item" resource="checkout" engine="innodb" comment="Sales Flat Quote Address Item">
315315
<column xsi:type="int" name="address_item_id" padding="10" unsigned="true" nullable="false" identity="true"
316316
comment="Address Item Id"/>
317317
<column xsi:type="int" name="parent_item_id" padding="10" unsigned="true" nullable="true" identity="false"
@@ -404,7 +404,7 @@
404404
<column name="quote_item_id"/>
405405
</index>
406406
</table>
407-
<table name="quote_item_option" resource="quote" engine="innodb" comment="Sales Flat Quote Item Option">
407+
<table name="quote_item_option" resource="checkout" engine="innodb" comment="Sales Flat Quote Item Option">
408408
<column xsi:type="int" name="option_id" padding="10" unsigned="true" nullable="false" identity="true"
409409
comment="Option Id"/>
410410
<column xsi:type="int" name="item_id" padding="10" unsigned="true" nullable="false" identity="false"
@@ -422,7 +422,7 @@
422422
<column name="item_id"/>
423423
</index>
424424
</table>
425-
<table name="quote_payment" resource="quote" engine="innodb" comment="Sales Flat Quote Payment">
425+
<table name="quote_payment" resource="checkout" engine="innodb" comment="Sales Flat Quote Payment">
426426
<column xsi:type="int" name="payment_id" padding="10" unsigned="true" nullable="false" identity="true"
427427
comment="Payment Id"/>
428428
<column xsi:type="int" name="quote_id" padding="10" unsigned="true" nullable="false" identity="false"
@@ -458,7 +458,7 @@
458458
<column name="quote_id"/>
459459
</index>
460460
</table>
461-
<table name="quote_shipping_rate" resource="quote" engine="innodb" comment="Sales Flat Quote Shipping Rate">
461+
<table name="quote_shipping_rate" resource="checkout" engine="innodb" comment="Sales Flat Quote Shipping Rate">
462462
<column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="true"
463463
comment="Rate Id"/>
464464
<column xsi:type="int" name="address_id" padding="10" unsigned="true" nullable="false" identity="false"
@@ -486,7 +486,7 @@
486486
<column name="address_id"/>
487487
</index>
488488
</table>
489-
<table name="quote_id_mask" resource="quote" engine="innodb" comment="Quote ID and masked ID mapping">
489+
<table name="quote_id_mask" resource="checkout" engine="innodb" comment="Quote ID and masked ID mapping">
490490
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
491491
comment="Entity Id"/>
492492
<column xsi:type="int" name="quote_id" padding="10" unsigned="true" nullable="false" identity="false"

app/code/Magento/SalesSequence/Setup/Patch/Schema/CreateSequence.php

Lines changed: 0 additions & 68 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\SalesSequence\Setup;
9+
10+
use Magento\Framework\Setup\InstallSchemaInterface;
11+
use Magento\Framework\Setup\ModuleContextInterface;
12+
use Magento\Framework\Setup\SchemaSetupInterface;
13+
14+
/**
15+
*/
16+
class Recurring implements InstallSchemaInterface
17+
{
18+
/**
19+
* @var SequenceCreator
20+
*/
21+
private $sequenceCreator;
22+
23+
/**
24+
* @param SequenceCreator $sequenceCreator
25+
*/
26+
public function __construct(
27+
SequenceCreator $sequenceCreator
28+
) {
29+
$this->sequenceCreator = $sequenceCreator;
30+
}
31+
32+
/**
33+
* {@inheritdoc}
34+
*/
35+
public function install(SchemaSetupInterface $setup, ModuleContextInterface $context)
36+
{
37+
$this->sequenceCreator->create();
38+
}
39+
}

app/code/Magento/SalesSequence/composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
},
77
"require": {
88
"php": "~7.1.3||~7.2.0",
9-
"magento/framework": "*",
10-
"magento/module-store": "*"
9+
"magento/framework": "*"
1110
},
1211
"type": "magento2-module",
1312
"license": [

0 commit comments

Comments
 (0)