Created
February 7, 2024 13:33
-
-
Save platonische/c23470cfa74dfca96290f1594b9fd130 to your computer and use it in GitHub Desktop.
Magento 2 db data checking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DELETE FROM eav_attribute_option_value | |
| WHERE value_id IN ( | |
| SELECT tmp.value_id from ( | |
| SELECT value_id | |
| FROM eav_attribute_option_value | |
| GROUP BY option_id, store_id | |
| HAVING COUNT(*) > 1 | |
| ) as tmp | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT eaov.value_id, eao.attribute_id, ea.attribute_code | |
| FROM eav_attribute_option_value as eaov | |
| LEFT JOIN eav_attribute_option as eao ON eaov.option_id = eao.option_id | |
| LEFT JOIN eav_attribute as ea ON eao.attribute_id = ea.attribute_id | |
| GROUP BY eaov.option_id, eaov.store_id | |
| HAVING COUNT(*) > 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment