Skip to content

Commit 46ccf46

Browse files
authored
fix: clickhouse db migration typo (#7350)
1 parent 740ebbf commit 46ccf46

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hive': patch
3+
---
4+
5+
Fix invalid materialized view definition causing failing ClickHouse migrations

packages/migrations/src/clickhouse-actions/015-otel-trace.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,8 @@ export const action: Action = async exec => {
241241
, "http_host" String CODEC(ZSTD(1))
242242
, "http_route" String CODEC(ZSTD(1))
243243
, "http_url" String CODEC(ZSTD(1))
244+
, "client_name" String
245+
, "client_version" String
244246
, "graphql_operation_name" String CODEC(ZSTD(1))
245247
, "graphql_operation_type" LowCardinality(String) CODEC(ZSTD(1))
246248
, "graphql_operation_document" String CODEC(ZSTD(1))
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import type { Action } from '../clickhouse';
2+
3+
export const action: Action = async exec => {
4+
await exec(`
5+
DROP VIEW IF EXISTS "otel_subgraph_spans_mv";
6+
`);
7+
await exec(`
8+
DROP TABLE IF EXISTS "otel_subgraph_spans";
9+
`);
10+
};

packages/migrations/src/clickhouse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export async function migrateClickHouse(
176176
import('./clickhouse-actions/013-apply-ttl'),
177177
import('./clickhouse-actions/014-audit-logs-access-token'),
178178
import('./clickhouse-actions/015-otel-trace'),
179+
import('./clickhouse-actions/016-subgraph-otel-traces-cleanup'),
179180
]);
180181

181182
async function actionRunner(action: Action, index: number) {

0 commit comments

Comments
 (0)