clickhouse-migration
Skill44 starsChanged 5 months agoApache-2.0View on GitHub
Workflow for ClickHouse schema changes — adding columns, tables, or modifying the OTEL analytics schema. Use when making changes to ClickHouse tables in the otel database.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- langwatch/langwatchtheir own version, first seen Oct 17, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- langwatch/langwatch★ 5ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- product/CLAUDE.mdCLAUDE.md
- pulse-web-otel/CLAUDE.mdCLAUDE.md
- add-ai-sub-agentSkill
- add-alert-metricSkill
- add-api-endpointSkill
- add-ui-componentSkill
- add-ui-screenSkill
- deploy-serviceSkill
- fatal-fiveSkill
- integrate-pulse-web-sdkSkill
- pr-reviewSkill
- pulse-prd-authorSkill
- pulse-prd-reviewSkill
- web-otel-spec-audit-orchestratorSkill
- web-otel-spec-implementation-auditSkill
- web-sdk-e2e-matrixSkill
- web-sdk-instrumentSkill
- web-sdk-shipSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
When you add or rename tables, materialized columns, or row-policy targets, update .cursor/ docs to match (at minimum …
- Very specific: line 49
If adding a new table, update deploy/scripts/init-clickhouse.sh to include it.
- Distinctive: line 53
Search for affected queries in:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
ClickHouse Migration
Workflow
- [ ] Step 1: Update the schema file
- [ ] Step 2: Create migration script
- [ ] Step 3: Update init script
- [ ] Step 4: Update affected queries in backend
- [ ] Step 5: Update AI agent schema registry
- [ ] Step 6: Apply and verifyStep 1: Update Schema File
Edit backend/db/prod/clickhouse/*.sql to reflect the final desired state. This file is used for fresh installs.
When you add or rename tables, materialized columns, or row-policy targets, update .cursor/ docs to match (at minimum
agents/data-analyst.md, rules/clickhouse-sql.mdc, rules/pulse-architecture.mdc, commands/query-clickhouse.md) or
run /audit-cursor-config to catch drift.
Step 2: Create Migration Script
Create deploy/db/migration-clickhouse-<description>.sql:
-- Adding a new column
ALTER TABLE otel.otel_traces ADD COLUMN IF NOT EXISTS new_column String DEFAULT '';
-- Adding a new table
CREATE TABLE IF NOT EXISTS otel.my_new_table (
Timestamp DateTime64(9) CODEC(Delta, ZSTD(1)),
TraceId String CODEC(ZSTD(1)),
-- ... columns ...
) ENGINE = MergeTree()
PARTITION BY toDate(Timestamp)
ORDER BY (TraceId, Timestamp)
SETTINGS index_granularity = 8192;Step 3: Update Init Script
If adding a new table, update deploy/scripts/init-clickhouse.sh to include it.
Step 4: Update Backend Queries
Search for affected queries in:
backend/server/src/main/java/.../service/— ClickhouseMetricService and relatedbackend/server/src/main/java/.../dao/— any DAO querying the changed table
Step 5: Update AI Agent
Note: The AI agent currently has a flat structure (pulse_ai/agent.py) with no registries. If the change affects
queryable tables/columns, update the root agent's instruction in pulse_ai/agent.py to reflect the new schema, or
update registry files at the pulse_ai/ root when they are added.
Step 6: Apply and Verify
# Apply to running ClickHouse
docker exec -i pulse-clickhouse clickhouse-client < deploy/db/migration-clickhouse-<desc>.sql
# Verify
docker exec pulse-clickhouse clickhouse-client --query "DESCRIBE otel.otel_traces"Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

