From cc693fd96446731cfcb079e10c1d8b372fffa9a9 Mon Sep 17 00:00:00 2001 From: Nithunikzz Date: Wed, 1 Nov 2023 16:22:59 +0530 Subject: [PATCH] changes event --- sql/20231031110543_update_event.up.sql | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/sql/20231031110543_update_event.up.sql b/sql/20231031110543_update_event.up.sql index 86cad1fa..4c58287b 100644 --- a/sql/20231031110543_update_event.up.sql +++ b/sql/20231031110543_update_event.up.sql @@ -1,2 +1,20 @@ -ALTER TABLE events - ALTER ENGINE = MergeTree(); +CREATE TABLE IF NOT EXISTS new_events ( + ClusterName String, + Id String, + EventTime DateTime('UTC'), + OpType String, + Name String, + Namespace String, + Kind String, + Message String, + Reason String, + Host String, + Event String, + FirstTime String, + LastTime String +) ENGINE = MergeTree() + ORDER BY (ClusterName, EventTime) + TTL EventTime + INTERVAL 10 MINUTE + SETTINGS index_granularity = 8192; + +ALTER TABLE new_events RENAME TO events;