clickhouse-migrations
ClickHouse migration patterns and rules. Use when creating or modifying ClickHouse migrations.
Install
git clone https://github.com/PostHog/posthog /tmp/posthog && ln -s /tmp/posthog/.agents/skills/clickhouse-migrations ~/.claude/skills/clickhouse-migrations
From README
ClickHouse Migrations Read posthog/clickhouse/migrations/AGENTS.md for comprehensive patterns, cluster , examples, and ingestion layer details. Quick reference Migration structure Node roles (choose by the cluster that owns the object) Only the members of NodeRole in posthog/clickhouse/client/connection.py are valid: ALL, DATA, INGESTIONEVENTS, INGESTIONSMALL, INGESTIONMEDIUM, ENDPOINTS, LOGS, AIEVENTS, AUX, BATCHEXPORTS, OPS, SESSIONS. A name that is not in that enum fails at import, which aborts migration discovery and takes every job that runs migrations down with it. Pick the role by which cluster owns the object, not by its type alone: [NodeRole.DATA]: anything on the main cluster — sharded tables, non-sharded replicated tables, distributed read tables, views, dictionaries. The default, and right for most migrations.
