Last active
July 6, 2018 00:08
-
-
Save trabulium/f7430a7d45cf11c6bdd36250a6e8b852 to your computer and use it in GitHub Desktop.
Copy Image position and label from Store Id 6 to Store ID 5 where position is '2'
This file contains 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
#Copy from Store 6 into Store 5 where position = 2; | |
INSERT INTO catalog_product_entity_media_gallery_value | |
( | |
value_id, | |
store_id, | |
label, | |
position, | |
disabled | |
) | |
SELECT value_id, | |
store_id, | |
label, | |
position, | |
disabled | |
FROM ( | |
SELECT value_id, | |
'5' AS store_id, | |
label, | |
position, | |
disabled | |
FROM catalog_product_entity_media_gallery_value | |
WHERE store_id = 6 | |
AND position = 2 ) real_query | |
on duplicate KEY | |
UPDATE value_id=real_query.value_id, | |
store_id=real_query.store_id, | |
label = real_query.label, | |
position = real_query.position, | |
disabled = real_query.disabled; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment