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.

fix(clickhouse): skip migration 0270 outside cloud (#70278)

Rory Shanks641dd5a7277d
diff --git a/posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.py b/posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.py
index e888a00b3ce7..d0e2acfbb0a5 100644
--- a/posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.py
+++ b/posthog/clickhouse/migrations/0270_property_values_drop_mv_length_filter.py
@@ -12,7 +12,11 @@ if settings.CLOUD_DEPLOYMENT == "DEV":
else:
_ROLES = [NodeRole.AUX]
-operations = [
- run_sql_with_exceptions(DROP_PROPERTY_VALUES_MV_SQL(), node_roles=_ROLES),
- run_sql_with_exceptions(PROPERTY_VALUES_MV_SQL(), node_roles=_ROLES),
-]
+operations = (
+ [
+ run_sql_with_exceptions(DROP_PROPERTY_VALUES_MV_SQL(), node_roles=_ROLES),
+ run_sql_with_exceptions(PROPERTY_VALUES_MV_SQL(), node_roles=_ROLES),
+ ]
+ if settings.CLOUD_DEPLOYMENT in ("US", "EU", "DEV")
+ else []
+)