From b74460549b1ecca7bbbbdc4e1bb294ffa72fd97c Mon Sep 17 00:00:00 2001 From: Dennis Trautwein Date: Mon, 16 Dec 2024 16:21:10 +0100 Subject: [PATCH] add: agent_version_semver to node_population primary key --- db/migrations/000003_create_node_population_table.up.sql | 2 +- .../000004_create_node_population_materialized_view.up.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrations/000003_create_node_population_table.up.sql b/db/migrations/000003_create_node_population_table.up.sql index f6a3e6b..0f604bf 100644 --- a/db/migrations/000003_create_node_population_table.up.sql +++ b/db/migrations/000003_create_node_population_table.up.sql @@ -4,4 +4,4 @@ CREATE TABLE node_population ( agent_version_type LowCardinality(String), agent_version_semver Array(Int16) ) ENGINE = AggregatingMergeTree() - PRIMARY KEY (timestamp, agent_version_type) \ No newline at end of file + PRIMARY KEY (timestamp, agent_version_type, agent_version_semver) \ No newline at end of file diff --git a/db/migrations/000004_create_node_population_materialized_view.up.sql b/db/migrations/000004_create_node_population_materialized_view.up.sql index d2afe4c..9eaa58a 100644 --- a/db/migrations/000004_create_node_population_materialized_view.up.sql +++ b/db/migrations/000004_create_node_population_materialized_view.up.sql @@ -5,4 +5,4 @@ SELECT agent_version_type, agent_version_semver FROM requests -GROUP BY timestamp, agent_version_type, agent_version_semver \ No newline at end of file +GROUP BY timestamp, agent_version_type, agent_version_semver; \ No newline at end of file