From 04da0af4bccf9cae5a34e8622a6ca6fe490ff8f6 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Thu, 16 Apr 2026 18:45:38 +0200 Subject: [PATCH] feat: add route_catalog table to ClickHouse schema --- .../src/main/resources/clickhouse/init.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cameleer-server-app/src/main/resources/clickhouse/init.sql b/cameleer-server-app/src/main/resources/clickhouse/init.sql index 38ac19d1..beca32d3 100644 --- a/cameleer-server-app/src/main/resources/clickhouse/init.sql +++ b/cameleer-server-app/src/main/resources/clickhouse/init.sql @@ -385,3 +385,16 @@ CREATE TABLE IF NOT EXISTS usage_events ( ENGINE = MergeTree() ORDER BY (tenant_id, timestamp, environment, username, normalized) TTL toDateTime(timestamp) + INTERVAL 90 DAY; + +-- ── Route Catalog ────────────────────────────────────────────────────── + +CREATE TABLE IF NOT EXISTS route_catalog ( + tenant_id LowCardinality(String) DEFAULT 'default', + environment LowCardinality(String) DEFAULT 'default', + application_id LowCardinality(String), + route_id LowCardinality(String), + first_seen DateTime64(3), + last_seen DateTime64(3) +) +ENGINE = ReplacingMergeTree(last_seen) +ORDER BY (tenant_id, environment, application_id, route_id);