Last active
June 7, 2022 08:49
-
-
Save peterjaap/e6b888dd6ca1c38a28cbe51ecfc99682 to your computer and use it in GitHub Desktop.
Delete core_config_data values where the fallback value in scope 0 is the same
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
DELETE FROM core_config_data WHERE config_id IN (SELECT config_id | |
FROM (SELECT DUPS.* | |
FROM core_config_data ORIG | |
LEFT JOIN core_config_data DUPS | |
ON ORIG.path = DUPS.path AND (ORIG.value = DUPS.value OR (ORIG.value IS NULL AND DUPS.value IS NULL)) | |
AND DUPS.scope != "default" AND DUPS.scope_id != 0 | |
WHERE ORIG.scope = "default" | |
AND ORIG.scope_id = 0 | |
AND DUPS.path IS NOT NULL) as tmp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment