Skip to content

Commit db49817

Browse files
committed
Merge remote-tracking branch '28796/add-unique-ket-on-eav-attribut-option-value' into comm_prs_248beta1
2 parents 46f4682 + 14ee777 commit db49817

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,10 @@
463463
<constraint xsi:type="foreign" referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID"
464464
table="eav_attribute_option_value" column="store_id" referenceTable="store"
465465
referenceColumn="store_id" onDelete="CASCADE"/>
466+
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_OPTION_ID">
467+
<column name="store_id"/>
468+
<column name="option_id"/>
469+
</constraint>
466470
<index referenceId="EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID" indexType="btree">
467471
<column name="option_id"/>
468472
</index>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,8 @@
290290
"constraint": {
291291
"PRIMARY": true,
292292
"EAV_ATTR_OPT_VAL_OPT_ID_EAV_ATTR_OPT_OPT_ID": true,
293-
"EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID": true
293+
"EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_STORE_STORE_ID": true,
294+
"EAV_ATTRIBUTE_OPTION_VALUE_STORE_ID_OPTION_ID": true
294295
}
295296
},
296297
"eav_attribute_label": {

0 commit comments

Comments
 (0)