Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(ml/replay): Revert Repair sharded_session_replay_features table (#58793)

Rory Shanks54ce53f80e0b
diff --git a/posthog/clickhouse/migrations/0254_repair_session_replay_features_unique_columns.py b/posthog/clickhouse/migrations/0254_repair_session_replay_features_unique_columns.py
deleted file mode 100644
index 95820be3b7f9..000000000000
--- a/posthog/clickhouse/migrations/0254_repair_session_replay_features_unique_columns.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from posthog.clickhouse.client.connection import NodeRole
-from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions
-from posthog.session_recordings.sql.session_replay_feature_sql import UNIQ_COMBINED_PRECISION
-
-REPAIR_SQL = f"""
-ALTER TABLE sharded_session_replay_features
- ADD COLUMN IF NOT EXISTS unique_url_count AggregateFunction(uniqCombined({UNIQ_COMBINED_PRECISION}), String),
- ADD COLUMN IF NOT EXISTS unique_click_target_count AggregateFunction(uniqCombined({UNIQ_COMBINED_PRECISION}), Int64)
-"""
-
-operations = [
- run_sql_with_exceptions(
- REPAIR_SQL,
- node_roles=[NodeRole.AUX],
- sharded=True,
- is_alter_on_replicated_table=True,
- ),
-]
diff --git a/posthog/clickhouse/migrations/max_migration.txt b/posthog/clickhouse/migrations/max_migration.txt
index fdaaaf21bcb1..9f0f72385bb4 100644
--- a/posthog/clickhouse/migrations/max_migration.txt
+++ b/posthog/clickhouse/migrations/max_migration.txt
@@ -1 +1 @@
-0254_repair_session_replay_features_unique_columns
\ No newline at end of file
+0253_drop_dead_msk_kafka_tables