aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/clickhouse.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-28 12:09:16 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-28 12:09:16 +0100
commit3cb78b82fa940da2c1cc206c59615fc85e0fbf99 (patch)
tree713e50890c1fc34e78451a5c12dc861eaf60ecfe /src/plugins/lua/clickhouse.lua
parent325dec8b6bd470dc81e50246f34c07b95c41e05e (diff)
downloadrspamd-3cb78b82fa940da2c1cc206c59615fc85e0fbf99.tar.gz
rspamd-3cb78b82fa940da2c1cc206c59615fc85e0fbf99.zip
[Minor] Clickhouse: Add comment safety operator
Diffstat (limited to 'src/plugins/lua/clickhouse.lua')
-rw-r--r--src/plugins/lua/clickhouse.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/lua/clickhouse.lua b/src/plugins/lua/clickhouse.lua
index c38669a2c..280957008 100644
--- a/src/plugins/lua/clickhouse.lua
+++ b/src/plugins/lua/clickhouse.lua
@@ -1164,7 +1164,7 @@ local function add_extra_columns(upstream, ev_base, cfg)
local sql = string.format('ALTER TABLE rspamd ADD COLUMN IF NOT EXISTS `%s` %s AFTER `%s`',
col.name, col.type, prev_column)
if col.comment then
- sql = sql .. string.format(", COMMENT COLUMN `%s` '%s'", col.name, col.comment)
+ sql = sql .. string.format(", COMMENT COLUMN IF EXISTS `%s` '%s'", col.name, col.comment)
end
local ret = lua_clickhouse.generic(upstream, settings, ch_params, sql,