CockroachDB schema diff — free to use

CockroachDB Schema Diff.
Generate migrations.
Zero setup.

Paste two cockroachdb dump --dump-mode=schema outputs. Spot every table, column, index, and constraint change instantly. Get ready-to-run ALTER TABLE scripts for CockroachDB — all in your browser.

No account required. No data leaves your device.

Built for CockroachDB workflows

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

🪳

SERIAL & UUID Primary Keys

Correctly detects SERIAL, UUID, and ROWID primary key changes across schema versions.

🌍

GEOGRAPHY & GEOMETRY

Recognizes GEOGRAPHY and GEOMETRY spatial types, plus GEOMETRYCOLLECTION and related SRID constraints.

🔑

Constraints & Indexes

Primary keys, unique constraints, foreign keys, CHECK constraints, and inverted indexes — all compared semantically, not by raw text.

📝

Quoted Identifiers

Handles double-quoted identifiers ("User") and mixed-case table names exactly like CockroachDB does.

Array & JSONB Columns

Recognizes INTEGER[], TEXT[], JSONB, and warns when these advanced types appear so nothing slips through.

🔒

Privacy First

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

How it works

1

Export your schemas

Run cockroachdb dump --dump-mode=schema old_db > old.sql on both databases.

2

Paste into SchemaLens

Copy the SQL into the two editor panes. Select PostgreSQL dialect — CockroachDB is PostgreSQL-wire compatible.

3

Review the diff

See added tables, dropped columns, type changes, and constraint modifications highlighted in color.

4

Copy the migration

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

CockroachDB migration examples

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

Column type change

ALTER TABLE "users"
  ALTER COLUMN "bio" TYPE VARCHAR(500);

Add a new column

ALTER TABLE "orders"
  ADD COLUMN "shipped_at" TIMESTAMP;

Add a foreign key

ALTER TABLE "comments"
  ADD CONSTRAINT "fk_comments_post"
  FOREIGN KEY ("post_id") REFERENCES "posts"("id");

Set a default value

ALTER TABLE "tasks"
  ALTER COLUMN "status" SET DEFAULT 'pending';

Related guides

Ready to diff your CockroachDB schemas?

A privacy-first schema diff tool. No account required.

Start Comparing Free

Free forever — unlimited tables. Pro power features — $39 once.