Index of every page on this site: llms.txt
All skills
jeremylongshore avatar

/clickhouse-upgrade-migration

@0d57af8
Run it yourself

Use when upgrading ClickHouse server versions or the @clickhouse/client SDK, handling breaking changes between versions, or migrating from older client libraries — covers version checks, changelog review, staged upgrade, post-upgrade validation, and rollback. Trigger with phrases like "upgrade clickhouse", "clickhouse version upgrade", "update clickhouse client", "clickhouse breaking changes", "new clickhouse version".

Use this Skill: https://skilld.dev/gh/jeremylongshore/tons-of-skills-marketplace/clickhouse-upgrade-migration

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesimplementation.md

≈680 tokens on demand. Your agent reads this file only when SKILL.md points to it.

ClickHouse Upgrade & Migration — Full Implementation

Complete, verbatim procedures for each upgrade step. The SKILL.md carries the lean workflow and skeletons; drill in here for the full command sequences.

Step 1: Check Current Versions

# 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
-- Server-side version details
SELECT
    version()           AS server_version,
    uptime()            AS uptime_sec,
    currentDatabase()   AS current_db;

Step 2: Review Changelog

# 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

git checkout -b upgrade/clickhouse-client
npm install @clickhouse/client@latest
npm test

The common code-migration patterns (the createClient option rename and the rs.json() result-shape change) live in examples.md under "Common migration patterns".

Step 4: Upgrade ClickHouse Server

ClickHouse Cloud: Upgrades happen automatically. Check release notes in the Cloud console.

Self-hosted upgrade procedure:

# 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

The full post-upgrade validation script (ping → version → schema → insert → query, with PASS/FAIL reporting) lives in examples.md under "Post-upgrade validation script".

Step 6: Rollback Procedure

The client, server, and data-restore rollback commands live in examples.md under "Rollback commands".

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning2mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub2mo

    The skill provides instructions for upgrading ClickHouse servers and Node.js clients. It requires high-privilege system operations using 'sudo' for package management and service control, which is necessary for server maintenance but represents a significant security capability. It also involves downloading official external dependencies and performing network requests to local services.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at 0d57af8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 4 months ago
What it can do
Reads files Edits files Runs commands
version
1.7.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
[
  "saas",
  "database",
  "analytics",
  "clickhouse",
  "olap"
]
All 4 allowed tools
ReadEditBash(npm:*)Bash(git:*)
Other metadata
compatibility
Designed for Claude Code

README badge

README badge for jeremylongshore/tons-of-skills-marketplace/clickhouse-upgrade-migration