Skip to content

Commit ece2528

Browse files
committed
B2B-1663: Add Primary Key on Magento CE DB Tables
1 parent c286894 commit ece2528

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
comment="category_id"/>
1616
<column xsi:type="int" name="product_id" unsigned="true" nullable="false" identity="false"
1717
comment="product_id"/>
18+
<constraint xsi:type="primary" referenceId="PRIMARY">
19+
<column name="url_rewrite_id"/>
20+
</constraint>
1821
<constraint xsi:type="foreign" referenceId="CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
1922
table="catalog_url_rewrite_product_category" column="product_id"
2023
referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>

app/code/Magento/CatalogUrlRewrite/etc/db_schema_whitelist.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99
"CATALOG_URL_REWRITE_PRODUCT_CATEGORY_CATEGORY_ID_PRODUCT_ID": true
1010
},
1111
"constraint": {
12+
"PRIMARY": true,
1213
"CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID": true,
1314
"FK_BB79E64705D7F17FE181F23144528FC8": true,
1415
"CAT_URL_REWRITE_PRD_CTGR_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID": true,
1516
"CAT_URL_REWRITE_PRD_CTGR_CTGR_ID_SEQUENCE_CAT_CTGR_SEQUENCE_VAL": true,
1617
"CAT_URL_REWRITE_PRD_CTGR_PRD_ID_SEQUENCE_PRD_SEQUENCE_VAL": true
1718
}
1819
}
19-
}
20+
}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
catalog_url_rewrite_product_category
21
queue_poison_pill

0 commit comments

Comments
 (0)