Description
This is similar to #24581 but for the table eav_attribute_option_value
Summary (*)
The table eav_attribute_option_value
does not have a unique index on the column pair (option_id
, store_id
).
There is no reason for an option to have 2 values for the same store so this should be restricted.
Also layered navigation disappears on frontend.
Examples (*)
Same as #24581, if by any faulty code an option gets 2 values for the same store view this causes a lot of issues when editing product / attributes / maybe others.
Proposed solution
add a unique key on the column pair (option_id
, store_id
) on the table eav_attribute_option_value
<table name="eav_attribute_option_value">
......
<constraint xsi:type="unique" referenceId="EAV_ATTRIBUTE_OPTION_VALUE_OPTION_ID_STORE_ID_UNIQUE">
<column name="store_id"/>
<column name="option_id"/>
</constraint>
</table>
Metadata
Metadata
Assignees
Labels
Gate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchAffects non-critical data or functionality and does not force users to employ a workaround.
Type
Projects
Status
Done