From ab7860e3e2982607e54d6767add46afc8145dc57 Mon Sep 17 00:00:00 2001 From: Cluas Date: Fri, 25 Oct 2024 17:15:32 +0800 Subject: [PATCH] fix: need if not exists for metrics_15s_dist (#593) --- lib/db/maintain/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/db/maintain/scripts.js b/lib/db/maintain/scripts.js index aac4b8ad..1311c878 100644 --- a/lib/db/maintain/scripts.js +++ b/lib/db/maintain/scripts.js @@ -198,7 +198,7 @@ module.exports.traces = [ ] module.exports.overall_dist = [ - `CREATE TABLE {{DB}}.metrics_15s_dist {{{OnCluster}}} ( + `CREATE TABLE IF NOT EXISTS {{DB}}.metrics_15s_dist {{{OnCluster}}} ( \`fingerprint\` UInt64, \`timestamp_ns\` Int64 CODEC(DoubleDelta), \`last\` AggregateFunction(argMax, Float64, Int64),