SELECT 'PLEASE ADD THE NEW SETTING TO SettingsChangesHistory.h: '|| name ||' WAS ADDED',
FROM new_settings
WHERE (name NOT IN (
SELECT name
FROM old_settings
)) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
WHERE splitByChar('.', version())[1] >='24'
))
UNION ALL
(
SELECT 'PLEASE ADD THE SETTING VALUE CHANGE TO SettingsChangesHistory.h: '|| name ||' WAS CHANGED FROM '|| old_settings.default ||' TO '|| new_settings.default,
FROM new_settings
LEFT JOIN old_settings ON new_settings.name = old_settings.name
WHERE (new_settings.default != old_settings.default) AND (name NOT IN (