ClickHouse schema diff — free to use

ClickHouse Schema Diff.
Generate migrations.
Zero setup.

Paste two SHOW CREATE TABLE outputs or system.tables DDL dumps. Spot every MergeTree column, partition key, ordering key, and materialized view change instantly. Get ready-to-run ALTER TABLE scripts for ClickHouse — all in your browser.

No account required. No data leaves your device.

Built for column-oriented analytics

SchemaLens understands ClickHouse-specific syntax that generic diff tools miss.

📊

MergeTree Engine Family

Compares MergeTree, ReplacingMergeTree, SummingMergeTree, AggregatingMergeTree, and ReplicatedMergeTree engine definitions across schema versions.

🔢

ClickHouse Native Types

Correctly handles Int8/16/32/64, UInt8/16/32/64, Float32/64, Decimal, DateTime64, UUID, IPv4/IPv6, Nested, and Enum8/16 types.

🔑

Partition & Ordering Keys

Detects changes to PARTITION BY, ORDER BY, and PRIMARY KEY expressions that control data distribution and query performance.

👁️

Materialized Views

Spots changes in CREATE MATERIALIZED VIEW definitions, TO target tables, and populates clauses that power real-time analytics pipelines.

Sparse Index Awareness

Understands ClickHouse's sparse primary index model. Compares INDEX declarations, projection definitions, and skip indexes for query optimization.

🔒

Privacy First

Your schema never leaves the browser. Compare production ClickHouse schemas safely without uploading sensitive table structures to a third-party server.

How it works

1

Export your schemas

Run SHOW CREATE TABLE db.table or query system.tables on both ClickHouse clusters.

2

Paste into SchemaLens

Copy the SQL into the two editor panes. Select MySQL dialect — ClickHouse DDL is closest to MySQL syntax.

3

Review the diff

See added tables, dropped columns, type changes, engine modifications, and partition key changes highlighted in color.

4

Copy the migration

Export ALTER TABLE scripts, save as Markdown, PDF, or raw SQL. Apply to staging, then production.

ClickHouse migration examples

SchemaLens generates production-ready ALTER TABLE scripts for every change it detects.

Add a metric column to an analytics table

ALTER TABLE events
  ADD COLUMN revenue Decimal(18, 2);

Change a column type

ALTER TABLE events
  MODIFY COLUMN event_time DateTime64(3);

Add a projection for faster queries

ALTER TABLE events
  ADD PROJECTION proj_daily
  ( SELECT toStartOfDay(event_time), count() GROUP BY day );

Update a materialized view target

CREATE MATERIALIZED VIEW events_mv
  TO events_summary
  AS SELECT ...

Related guides

Ready to diff your ClickHouse schemas?

Join thousands of developers who use SchemaLens to catch schema changes before they hit production.

Start Comparing Free

Free for up to 10 tables. Pro starts at $12/mo.