Skip to content

Commit 0dcb19e

Browse files
authored
Merge pull request #4868 from magento-techdivision/MC-13951-Declarative-upgrade-leads-to-the-re-creation-of-indexes
[techdivision] MC-13951: Declarative upgrade leads to the re-creation of constraints
2 parents 4321600 + 8cb33c4 commit 0dcb19e

File tree

10 files changed

+30
-369
lines changed

10 files changed

+30
-369
lines changed

Diff for: app/code/Magento/Bundle/Setup/Patch/Schema/ChangeTmpTablesEngine.php

-68
This file was deleted.

Diff for: app/code/Magento/Bundle/etc/db_schema.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<column name="website_id"/>
204204
</constraint>
205205
</table>
206-
<table name="catalog_product_index_price_bundle_tmp" resource="default" engine="memory"
206+
<table name="catalog_product_index_price_bundle_tmp" resource="default" engine="innodb"
207207
comment="Catalog Product Index Price Bundle Tmp">
208208
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
209209
comment="Entity ID"/>
@@ -265,7 +265,7 @@
265265
<column name="selection_id"/>
266266
</constraint>
267267
</table>
268-
<table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="memory"
268+
<table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="innodb"
269269
comment="Catalog Product Index Price Bundle Sel Tmp">
270270
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
271271
comment="Entity ID"/>
@@ -320,7 +320,7 @@
320320
<column name="option_id"/>
321321
</constraint>
322322
</table>
323-
<table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="memory"
323+
<table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="innodb"
324324
comment="Catalog Product Index Price Bundle Opt Tmp">
325325
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
326326
comment="Entity ID"/>

Diff for: app/code/Magento/Catalog/Setup/Patch/Schema/ChangeTmpTablesEngine.php

-74
This file was deleted.

Diff for: app/code/Magento/Catalog/etc/db_schema.xml

+19-19
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@
12381238
<column name="website_id"/>
12391239
</constraint>
12401240
</table>
1241-
<table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="memory"
1241+
<table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="innodb"
12421242
comment="Catalog Product Price Indexer Config Option Aggregate Temp Table">
12431243
<column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
12441244
comment="Parent ID"/>
@@ -1279,7 +1279,7 @@
12791279
<column name="website_id"/>
12801280
</constraint>
12811281
</table>
1282-
<table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="memory"
1282+
<table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="innodb"
12831283
comment="Catalog Product Price Indexer Config Option Temp Table">
12841284
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
12851285
comment="Entity ID"/>
@@ -1327,7 +1327,7 @@
13271327
<column name="website_id"/>
13281328
</constraint>
13291329
</table>
1330-
<table name="catalog_product_index_price_final_tmp" resource="default" engine="memory"
1330+
<table name="catalog_product_index_price_final_tmp" resource="default" engine="innodb"
13311331
comment="Catalog Product Price Indexer Final Temp Table">
13321332
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
13331333
comment="Entity ID"/>
@@ -1375,7 +1375,7 @@
13751375
<column name="website_id"/>
13761376
</constraint>
13771377
</table>
1378-
<table name="catalog_product_index_price_opt_tmp" resource="default" engine="memory"
1378+
<table name="catalog_product_index_price_opt_tmp" resource="default" engine="innodb"
13791379
comment="Catalog Product Price Indexer Option Temp Table">
13801380
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
13811381
comment="Entity ID"/>
@@ -1418,7 +1418,7 @@
14181418
<column name="option_id"/>
14191419
</constraint>
14201420
</table>
1421-
<table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="memory"
1421+
<table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="innodb"
14221422
comment="Catalog Product Price Indexer Option Aggregate Temp Table">
14231423
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
14241424
comment="Entity ID"/>
@@ -1470,7 +1470,7 @@
14701470
<column name="value"/>
14711471
</index>
14721472
</table>
1473-
<table name="catalog_product_index_eav_tmp" resource="default" engine="memory"
1473+
<table name="catalog_product_index_eav_tmp" resource="default" engine="innodb"
14741474
comment="Catalog Product EAV Indexer Temp Table">
14751475
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
14761476
comment="Entity ID"/>
@@ -1489,13 +1489,13 @@
14891489
<column name="value"/>
14901490
<column name="source_id"/>
14911491
</constraint>
1492-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="hash">
1492+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="btree">
14931493
<column name="attribute_id"/>
14941494
</index>
1495-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="hash">
1495+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="btree">
14961496
<column name="store_id"/>
14971497
</index>
1498-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="hash">
1498+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="btree">
14991499
<column name="value"/>
15001500
</index>
15011501
</table>
@@ -1528,7 +1528,7 @@
15281528
<column name="value"/>
15291529
</index>
15301530
</table>
1531-
<table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="memory"
1531+
<table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="innodb"
15321532
comment="Catalog Product EAV Decimal Indexer Temp Table">
15331533
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
15341534
comment="Entity ID"/>
@@ -1547,13 +1547,13 @@
15471547
<column name="value"/>
15481548
<column name="source_id"/>
15491549
</constraint>
1550-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="hash">
1550+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="btree">
15511551
<column name="attribute_id"/>
15521552
</index>
1553-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="hash">
1553+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="btree">
15541554
<column name="store_id"/>
15551555
</index>
1556-
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="hash">
1556+
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="btree">
15571557
<column name="value"/>
15581558
</index>
15591559
</table>
@@ -1592,7 +1592,7 @@
15921592
<column name="min_price"/>
15931593
</index>
15941594
</table>
1595-
<table name="catalog_product_index_price_tmp" resource="default" engine="memory"
1595+
<table name="catalog_product_index_price_tmp" resource="default" engine="innodb"
15961596
comment="Catalog Product Price Indexer Temp Table">
15971597
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
15981598
comment="Entity ID"/>
@@ -1617,17 +1617,17 @@
16171617
<column name="customer_group_id"/>
16181618
<column name="website_id"/>
16191619
</constraint>
1620-
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="hash">
1620+
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="btree">
16211621
<column name="customer_group_id"/>
16221622
</index>
1623-
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="hash">
1623+
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="btree">
16241624
<column name="website_id"/>
16251625
</index>
1626-
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="hash">
1626+
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="btree">
16271627
<column name="min_price"/>
16281628
</index>
16291629
</table>
1630-
<table name="catalog_category_product_index_tmp" resource="default" engine="memory"
1630+
<table name="catalog_category_product_index_tmp" resource="default" engine="innodb"
16311631
comment="Catalog Category Product Indexer temporary table">
16321632
<column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
16331633
default="0" comment="Category ID"/>
@@ -1646,7 +1646,7 @@
16461646
<column name="product_id"/>
16471647
<column name="store_id"/>
16481648
</constraint>
1649-
<index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="hash">
1649+
<index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="btree">
16501650
<column name="product_id"/>
16511651
<column name="category_id"/>
16521652
<column name="store_id"/>

Diff for: app/code/Magento/CatalogInventory/Setup/Patch/Schema/ChangeTmpTablesEngine.php

-61
This file was deleted.

Diff for: app/code/Magento/CatalogInventory/etc/db_schema.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
<column name="website_id"/>
143143
</index>
144144
</table>
145-
<table name="cataloginventory_stock_status_tmp" resource="default" engine="memory"
145+
<table name="cataloginventory_stock_status_tmp" resource="default" engine="innodb"
146146
comment="Cataloginventory Stock Status Indexer Tmp">
147147
<column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
148148
comment="Product ID"/>
@@ -159,10 +159,10 @@
159159
<column name="website_id"/>
160160
<column name="stock_id"/>
161161
</constraint>
162-
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="hash">
162+
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="btree">
163163
<column name="stock_id"/>
164164
</index>
165-
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="hash">
165+
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="btree">
166166
<column name="website_id"/>
167167
</index>
168168
</table>

0 commit comments

Comments
 (0)