clickhouse-upgrade-migration
Upgrade ClickHouse server versions and @clickhouse/client SDK safely. Use when upgrading ClickHouse, handling breaking changes between versions, or migrating from older client libraries. Trigger: "upgrade clickhouse", "clickhouse version upgrade", "update clickhouse client", "clickhouse breaking changes", "new clickhouse version".
Best use case
clickhouse-upgrade-migration is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Upgrade ClickHouse server versions and @clickhouse/client SDK safely. Use when upgrading ClickHouse, handling breaking changes between versions, or migrating from older client libraries. Trigger: "upgrade clickhouse", "clickhouse version upgrade", "update clickhouse client", "clickhouse breaking changes", "new clickhouse version".
Teams using clickhouse-upgrade-migration should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/clickhouse-upgrade-migration/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How clickhouse-upgrade-migration Compares
| Feature / Agent | clickhouse-upgrade-migration | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Upgrade ClickHouse server versions and @clickhouse/client SDK safely. Use when upgrading ClickHouse, handling breaking changes between versions, or migrating from older client libraries. Trigger: "upgrade clickhouse", "clickhouse version upgrade", "update clickhouse client", "clickhouse breaking changes", "new clickhouse version".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# ClickHouse Upgrade & Migration
## Overview
Safely upgrade ClickHouse server and the `@clickhouse/client` Node.js SDK,
with rollback procedures and breaking change detection.
## Prerequisites
- Current ClickHouse version known (`SELECT version()`)
- Git for version control
- Test suite for integration validation
- Staging environment for pre-production testing
## Instructions
### Step 1: Check Current Versions
```bash
# Check server version (via HTTP)
curl 'http://localhost:8123/?query=SELECT+version()'
# Check Node.js client version
npm list @clickhouse/client
# Check latest available
npm view @clickhouse/client version
```
```sql
-- Server-side version details
SELECT
version() AS server_version,
uptime() AS uptime_sec,
currentDatabase() AS current_db;
```
### Step 2: Review Changelog
```bash
# View release notes
open https://github.com/ClickHouse/clickhouse-js/releases
# Server changelog
open https://github.com/ClickHouse/ClickHouse/blob/master/CHANGELOG.md
```
**Key breaking changes to watch for:**
- Client API signature changes (`createClient` options)
- Default setting changes (compression, timeouts)
- New query result format behavior
- Deprecated SQL functions removed in server upgrades
- MergeTree settings renamed or defaults changed
### Step 3: Upgrade the Node.js Client
```bash
git checkout -b upgrade/clickhouse-client
npm install @clickhouse/client@latest
npm test
```
**Common migration patterns:**
```typescript
// v0.x → v1.x: createClient options restructured
// Before (v0.x)
import { createClient } from '@clickhouse/client';
const client = createClient({
host: 'http://localhost:8123',
});
// After (v1.x)
const client = createClient({
url: 'http://localhost:8123', // 'host' renamed to 'url'
});
// v0.x → v1.x: query result handling
// Before: rs.json() returned { data: [...], statistics: {...} }
// After: rs.json() returns the rows array directly
// Before
const result = await rs.json();
const rows = result.data;
// After
const rows = await rs.json();
```
### Step 4: Upgrade ClickHouse Server
**ClickHouse Cloud:** Upgrades happen automatically. Check release notes in
the Cloud console.
**Self-hosted upgrade procedure:**
```bash
# 1. Backup current data
clickhouse-client --query "BACKUP DATABASE analytics TO Disk('backups', 'pre-upgrade')"
# 2. Check compatibility
clickhouse-client --query "SELECT * FROM system.settings WHERE changed"
# 3. Stop server gracefully
sudo systemctl stop clickhouse-server
# 4. Update packages
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install clickhouse-server clickhouse-client
# 5. Start and verify
sudo systemctl start clickhouse-server
clickhouse-client --query "SELECT version()"
# 6. Check for schema issues
clickhouse-client --query "
SELECT database, table, engine, metadata_modification_time
FROM system.tables WHERE database NOT IN ('system', 'INFORMATION_SCHEMA')
"
```
### Step 5: Validate After Upgrade
```typescript
// Post-upgrade validation script
import { createClient } from '@clickhouse/client';
const client = createClient({ url: process.env.CLICKHOUSE_HOST! });
async function validateUpgrade() {
const checks = [
{ name: 'ping', fn: () => client.ping() },
{ name: 'version', fn: async () => {
const rs = await client.query({ query: 'SELECT version()', format: 'JSONEachRow' });
return rs.json();
}},
{ name: 'schema', fn: async () => {
const rs = await client.query({
query: 'SELECT database, name, engine FROM system.tables WHERE database = {db:String}',
query_params: { db: 'analytics' },
format: 'JSONEachRow',
});
return rs.json();
}},
{ name: 'insert', fn: async () => {
await client.insert({
table: 'analytics.events',
values: [{ event_type: 'upgrade_test', user_id: 0, payload: '{}' }],
format: 'JSONEachRow',
});
return { success: true };
}},
{ name: 'query', fn: async () => {
const rs = await client.query({
query: 'SELECT count() AS cnt FROM analytics.events',
format: 'JSONEachRow',
});
return rs.json();
}},
];
for (const check of checks) {
try {
const result = await check.fn();
console.log(`[PASS] ${check.name}:`, JSON.stringify(result));
} catch (err) {
console.error(`[FAIL] ${check.name}:`, (err as Error).message);
}
}
}
validateUpgrade();
```
### Step 6: Rollback Procedure
```bash
# Node.js client rollback
npm install @clickhouse/client@<previous-version> --save-exact
# Server rollback (self-hosted)
sudo systemctl stop clickhouse-server
sudo apt-get install clickhouse-server=<previous-version>
sudo systemctl start clickhouse-server
# Restore from backup if needed
clickhouse-client --query "RESTORE DATABASE analytics FROM Disk('backups', 'pre-upgrade')"
```
## Version Compatibility Matrix
| 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 |
## Error Handling
| 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 |
## Resources
- [Client Releases](https://github.com/ClickHouse/clickhouse-js/releases)
- [Server Changelog](https://github.com/ClickHouse/ClickHouse/blob/master/CHANGELOG.md)
- [Cloud Upgrades](https://clickhouse.com/docs/cloud/manage/upgrades)
## Next Steps
For CI/CD integration, see `clickhouse-ci-integration`.Related Skills
workhuman-upgrade-migration
Workhuman upgrade migration for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman upgrade migration".
wispr-upgrade-migration
Wispr Flow upgrade migration for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr upgrade migration".
windsurf-upgrade-migration
Upgrade Windsurf IDE, migrate settings from VS Code or Cursor, and handle breaking changes. Use when upgrading Windsurf versions, migrating from another editor, or handling configuration changes after updates. Trigger with phrases like "upgrade windsurf", "windsurf update", "migrate to windsurf", "windsurf from cursor", "windsurf from vscode".
windsurf-migration-deep-dive
Migrate to Windsurf from VS Code, Cursor, or other AI IDEs with full configuration transfer. Use when migrating a team to Windsurf, transferring Cursor rules, or evaluating Windsurf against other AI editors. Trigger with phrases like "migrate to windsurf", "switch to windsurf", "windsurf from cursor", "windsurf from copilot", "windsurf evaluation".
webflow-upgrade-migration
Analyze, plan, and execute Webflow SDK upgrades (webflow-api v1 to v3) with breaking change detection, API v1-to-v2 migration, and deprecation handling. Trigger with phrases like "upgrade webflow", "webflow migration", "webflow breaking changes", "update webflow SDK", "webflow v1 to v2".
webflow-migration-deep-dive
Execute major Webflow migrations — from other CMS platforms to Webflow CMS, between Webflow sites, or large-scale content re-architecture using the Data API v2 bulk endpoints, strangler fig pattern, and data validation. Trigger with phrases like "migrate to webflow", "webflow migration", "import into webflow", "webflow replatform", "move content to webflow", "webflow bulk import", "wordpress to webflow".
vercel-upgrade-migration
Upgrade Vercel CLI, Node.js runtime, and Next.js framework versions with breaking change detection. Use when upgrading Vercel CLI versions, migrating Node.js runtimes, or updating Next.js between major versions on Vercel. Trigger with phrases like "upgrade vercel", "vercel migration", "vercel breaking changes", "update vercel CLI", "next.js upgrade on vercel".
vercel-migration-deep-dive
Migrate to Vercel from other platforms or re-architecture existing Vercel deployments. Use when migrating from Netlify, AWS, or Cloudflare to Vercel, or when re-platforming an existing Vercel application. Trigger with phrases like "migrate to vercel", "vercel migration", "switch to vercel", "netlify to vercel", "aws to vercel", "vercel replatform".
veeva-upgrade-migration
Veeva Vault upgrade migration for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva upgrade migration".
veeva-migration-deep-dive
Veeva Vault migration deep dive for enterprise operations. Use when implementing advanced Veeva Vault patterns. Trigger: "veeva migration deep dive".
vastai-upgrade-migration
Upgrade Vast.ai CLI, migrate API versions, and handle breaking changes. Use when upgrading vastai CLI, detecting deprecations, or migrating between API versions. Trigger with phrases like "upgrade vastai", "vastai migration", "vastai breaking changes", "update vastai CLI".
vastai-migration-deep-dive
Migrate GPU workloads to or from Vast.ai, or between GPU providers. Use when switching from AWS/GCP/Azure GPU instances to Vast.ai, migrating between GPU types, or re-platforming ML infrastructure. Trigger with phrases like "migrate to vastai", "vastai migration", "switch to vastai", "vastai from aws", "vastai from lambda".