/clickhouse-pack:clickhouse-upgrade-migrationfrom clickhouse-pack
Upgrades ClickHouse server and @clickhouse/client Node.js SDK with breaking-change detection, staged upgrade, validation, and rollback.
Ships in clickhouse-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Safely upgrade ClickHouse server and the @clickhouse/client Node.js SDK, with
rollback procedures and breaking-change detection. The workflow is check versions
→ review changelogs → upgrade the client → upgrade the server → validate →
rollback if needed. Full command sequences live in
references/implementation.md; the runnable
migration, validation, and rollback code lives in
references/examples.md.
SELECT version())upgrade/ branch)npm test)CLICKHOUSE_HOST set (and credentials — see Authentication)The client and validation scripts read the server URL from the
CLICKHOUSE_HOST environment variable (e.g. http://localhost:8123 locally, or
your ClickHouse Cloud endpoint). Keep credentials in the environment, never
hardcoded: pass username / password to createClient from
process.env.CLICKHOUSE_USER / CLICKHOUSE_PASSWORD, and for raw curl send
them via the X-ClickHouse-User / X-ClickHouse-Key headers. ClickHouse Cloud
endpoints require TLS (https://) and a password; self-hosted default installs
often run open on 8123 (the HTTP port) in dev only.
Work the steps in order — the client upgrade and the server upgrade are separate, independently reversible changes. Read references/implementation.md for the full command sequence of each step.
Capture the server version, the installed client version, and the latest published client before changing anything — this is your rollback target.
curl 'http://localhost:8123/?query=SELECT+version()' # server
npm list @clickhouse/client # installed client
npm view @clickhouse/client version # latest available
Read the client and server changelogs and note breaking changes: createClient
option renames, default setting changes (compression, timeouts), query
result-format behavior, removed SQL functions, and renamed MergeTree settings.
Full checklist and links: implementation.md Step 2.
Isolate the client bump on a branch so it is reversible independent of the server.
git checkout -b upgrade/clickhouse-client
npm install @clickhouse/client@latest
npm test
Then apply the code-migration patterns (the host → url option rename and the
rs.json() result-shape change) — full before/after in
references/examples.md under "Common migration patterns".
Edit the client-initialization and result-handling code to match.
ClickHouse Cloud upgrades automatically — just read the console release notes.
Self-hosted follows a fixed sequence: backup → check changed settings → stop →
apt-get install → start → verify version → scan schema. Full command block:
implementation.md Step 4.
Run the post-upgrade validation script — ping, version, schema, insert, and query checks, each reporting PASS/FAIL. Full script: references/examples.md under "Post-upgrade validation script".
If validation fails, roll back the client (npm install the previous version
with --save-exact), the server package, and — if data is affected — RESTORE from the
pre-upgrade backup. Full commands:
references/examples.md under "Rollback commands".
| Client Version | Min Server Version | Node.js | Key Changes |
|---|---|---|---|
| 1.x | 22.6+ | 18+ | Stable API, url option |
| 0.3.x | 22.6+ | 16+ | host option, different JSON result shape |
| 0.2.x | 21.8+ | 14+ | Initial release |
upgrade/ branch with npm test greenhost → url, rs.json() shape)| Issue | Cause | Solution |
|---|---|---|
Unknown setting | New default in config | Remove deprecated setting |
Cannot parse datetime | Format change | Update date format strings |
Method not found | Client API changed | Check migration guide |
Checksum mismatch | Corrupted upgrade | Rollback and re-download |
Two ready-to-run starting points live in references/examples.md:
createClient option
rename and the rs.json() result-shape change between v0.x and v1.x.// Validation entry point — full runner in references/examples.md
const client = createClient({ url: process.env.CLICKHOUSE_HOST! });
await client.ping(); // 1. reachable
await client.query({ query: 'SELECT version()', format: 'JSONEachRow' }); // 2. new version live
// 3. schema, insert, and query checks follow in the full script
For CI/CD integration of the upgraded client, see clickhouse-ci-integration.
For pre-production release gating, see clickhouse-prod-checklist.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
clickhouse, upgrade, migration, olap, database, breaking-changes
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin clickhouse-pack24 skills in this plugin
/clickhouse-ci-integrationRun ClickHouse integration tests in CI with GitHub Actions and Docker
containers. Use when setting up automated testing against a real ClickHouse
instance, configuring CI pipelines, or implementing schema validation in CI.
Trigger with "clickhouse CI", "clickhouse GitHub Actions", "clickhouse
integration tests", "test clickhouse in CI", "clickhouse automated testing".
/clickhouse-common-errorsDiagnose and fix the top 15 ClickHouse errors — query failures, insert problems,
memory limits, and merge issues.
Use when a ClickHouse query or insert throws an exception, a server-side error
appears in logs, or a failed query needs root-cause analysis.
Trigger with "clickhouse error", "fix clickhouse", "clickhouse not working",
"debug clickhouse", "clickhouse exception", "clickhouse syntax error".
/clickhouse-core-workflow-aDesign ClickHouse schemas with MergeTree engines, ORDER BY keys, and
partitioning.
Use when creating new tables, choosing an engine, designing sort keys, or
modeling data for analytical workloads on ClickHouse or ClickHouse Cloud.
Trigger with "clickhouse schema design", "clickhouse table design",
"clickhouse ORDER BY", "clickhouse partitioning", "MergeTree table".
Other plugins' skills for the same job