# clickhouse local --query "select name, value from system.merge_tree_settings order by name format TSV" > 02995_merge_tree_settings_settings_24_11_2.tsv
SELECT 'PLEASE ADD THE NEW MERGE_TREE_SETTING TO SettingsChangesHistory.cpp: '|| name ||' WAS ADDED'
FROM new_merge_tree_settings
WHERE (name NOT IN (
SELECT name
FROM old_merge_tree_settings
)) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
WHERE type='MergeTree' AND splitByChar('.', version)[1]::UInt64 >=24 AND splitByChar('.', version)[2]::UInt64 > 11
))
)
UNION ALL
(
SELECT 'PLEASE ADD THE SETTING VALUE CHANGE TO SettingsChangesHistory.cpp: '|| name ||' WAS CHANGED FROM '|| old_settings.default ||' TO '|| new_settings.default
SELECT 'PLEASE ADD THE MERGE_TREE_SETTING VALUE CHANGE TO SettingsChangesHistory.cpp: '|| name ||' WAS CHANGED FROM '|| old_merge_tree_settings.default ||' TO '|| new_merge_tree_settings.default
FROM new_merge_tree_settings
LEFT JOIN old_merge_tree_settings ON new_merge_tree_settings.name = old_merge_tree_settings.name
WHERE (new_merge_tree_settings.default != old_merge_tree_settings.default) AND (name NOT IN (
SELECT arrayJoin(tupleElement(changes, 'name'))
FROM system.settings_changes
WHERE type='MergeTree' AND splitByChar('.', version)[1]::UInt64 >=24 AND splitByChar('.', version)[2]::UInt64 > 11