Skip to content

Commit

Permalink
Merge pull request #4868 from magento-techdivision/MC-13951-Declarati…
Browse files Browse the repository at this point in the history
…ve-upgrade-leads-to-the-re-creation-of-indexes

[techdivision] MC-13951: Declarative upgrade leads to the re-creation of constraints
  • Loading branch information
rganin committed Oct 14, 2019
2 parents 4321600 + 8cb33c4 commit 0dcb19e
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 369 deletions.

This file was deleted.

6 changes: 3 additions & 3 deletions app/code/Magento/Bundle/etc/db_schema.xml
Expand Up @@ -203,7 +203,7 @@
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_bundle_tmp" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -265,7 +265,7 @@
<column name="selection_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_bundle_sel_tmp" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Sel Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -320,7 +320,7 @@
<column name="option_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_bundle_opt_tmp" resource="default" engine="innodb"
comment="Catalog Product Index Price Bundle Opt Tmp">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down

This file was deleted.

38 changes: 19 additions & 19 deletions app/code/Magento/Catalog/etc/db_schema.xml
Expand Up @@ -1238,7 +1238,7 @@
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_cfg_opt_agr_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Config Option Aggregate Temp Table">
<column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Parent ID"/>
Expand Down Expand Up @@ -1279,7 +1279,7 @@
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_cfg_opt_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Config Option Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -1327,7 +1327,7 @@
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_final_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_final_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Final Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -1375,7 +1375,7 @@
<column name="website_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_opt_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_opt_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Option Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -1418,7 +1418,7 @@
<column name="option_id"/>
</constraint>
</table>
<table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_opt_agr_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Option Aggregate Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand Down Expand Up @@ -1470,7 +1470,7 @@
<column name="value"/>
</index>
</table>
<table name="catalog_product_index_eav_tmp" resource="default" engine="memory"
<table name="catalog_product_index_eav_tmp" resource="default" engine="innodb"
comment="Catalog Product EAV Indexer Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand All @@ -1489,13 +1489,13 @@
<column name="value"/>
<column name="source_id"/>
</constraint>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE" indexType="btree">
<column name="value"/>
</index>
</table>
Expand Down Expand Up @@ -1528,7 +1528,7 @@
<column name="value"/>
</index>
</table>
<table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="memory"
<table name="catalog_product_index_eav_decimal_tmp" resource="default" engine="innodb"
comment="Catalog Product EAV Decimal Indexer Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand All @@ -1547,13 +1547,13 @@
<column name="value"/>
<column name="source_id"/>
</constraint>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID" indexType="btree">
<column name="attribute_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID" indexType="btree">
<column name="store_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE" indexType="btree">
<column name="value"/>
</index>
</table>
Expand Down Expand Up @@ -1592,7 +1592,7 @@
<column name="min_price"/>
</index>
</table>
<table name="catalog_product_index_price_tmp" resource="default" engine="memory"
<table name="catalog_product_index_price_tmp" resource="default" engine="innodb"
comment="Catalog Product Price Indexer Temp Table">
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Entity ID"/>
Expand All @@ -1617,17 +1617,17 @@
<column name="customer_group_id"/>
<column name="website_id"/>
</constraint>
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_CUSTOMER_GROUP_ID" indexType="btree">
<column name="customer_group_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_WEBSITE_ID" indexType="btree">
<column name="website_id"/>
</index>
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="hash">
<index referenceId="CATALOG_PRODUCT_INDEX_PRICE_TMP_MIN_PRICE" indexType="btree">
<column name="min_price"/>
</index>
</table>
<table name="catalog_category_product_index_tmp" resource="default" engine="memory"
<table name="catalog_category_product_index_tmp" resource="default" engine="innodb"
comment="Catalog Category Product Indexer temporary table">
<column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
default="0" comment="Category ID"/>
Expand All @@ -1646,7 +1646,7 @@
<column name="product_id"/>
<column name="store_id"/>
</constraint>
<index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="hash">
<index referenceId="CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID" indexType="btree">
<column name="product_id"/>
<column name="category_id"/>
<column name="store_id"/>
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions app/code/Magento/CatalogInventory/etc/db_schema.xml
Expand Up @@ -142,7 +142,7 @@
<column name="website_id"/>
</index>
</table>
<table name="cataloginventory_stock_status_tmp" resource="default" engine="memory"
<table name="cataloginventory_stock_status_tmp" resource="default" engine="innodb"
comment="Cataloginventory Stock Status Indexer Tmp">
<column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
comment="Product ID"/>
Expand All @@ -159,10 +159,10 @@
<column name="website_id"/>
<column name="stock_id"/>
</constraint>
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="hash">
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID" indexType="btree">
<column name="stock_id"/>
</index>
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="hash">
<index referenceId="CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID" indexType="btree">
<column name="website_id"/>
</index>
</table>
Expand Down

0 comments on commit 0dcb19e

Please sign in to comment.