DuckDB schema diff — free to use

DuckDB Schema Diff.
Generate migrations.
Zero setup.

Paste two duckdb my.db ".schema" outputs or DESCRIBE results. Spot every table, column, index, and constraint change instantly. Get ready-to-run ALTER TABLE scripts for DuckDB — all in your browser.

No account required. No data leaves your device.

Built for analytical workloads

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

🦆

In-Process Schema Comparison

Compares CREATE TABLE definitions from DuckDB databases, including columnar types, nested structures, and Parquet-derived schemas.

📊

Analytical Types

Correctly handles STRUCT, LIST, MAP, ENUM, DECIMAL, and complex nested types across schema versions.

🔑

Constraints & Indexes

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

📁

External Table Schemas

Detects changes in CREATE VIEW and external table definitions for Parquet, CSV, and JSON ingestion pipelines.

PostgreSQL-Compatible Parser

Because DuckDB speaks PostgreSQL SQL, SchemaLens parses every table, index, and constraint with full accuracy.

🔒

Privacy First

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

How it works

1

Export your schemas

Run duckdb my.db ".schema" or query information_schema.tables on both DuckDB databases.

2

Paste into SchemaLens

Copy the SQL into the two editor panes. Select PostgreSQL dialect — DuckDB is PostgreSQL-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.

DuckDB migration examples

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

Add a metric column to an analytical table

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

Change a column type

ALTER TABLE "users"
  ALTER COLUMN "preferences" TYPE STRUCT(tag VARCHAR, score INTEGER);

Add an ART index

CREATE UNIQUE INDEX "idx_users_email"
  ON "users" ("email");

Add a foreign key

ALTER TABLE "orders"
  ADD CONSTRAINT "fk_orders_user"
  FOREIGN KEY ("user_id") REFERENCES "users"("id");

Related guides

Ready to diff your DuckDB schemas?

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

Start Comparing Free

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