commit 3cb78b8: [Minor] Clickhouse: Add comment safety operator
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Sep 28 11:14:06 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-09-28 12:09:16 +0100
URL: https://github.com/rspamd/rspamd/commit/3cb78b82fa940da2c1cc206c59615fc85e0fbf99 (HEAD -> master)
[Minor] Clickhouse: Add comment safety operator
---
src/plugins/lua/clickhouse.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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,
More information about the Commits
mailing list