Database & SQL

Database Schema Diff Viewer

Paste two CREATE TABLE schema definitions and instantly see added, removed and changed tables, columns, indexes and foreign keys — plus a suggested migration script. Nothing is uploaded; the comparison runs on this page.

Runs in your browser MySQL-style DDL v1.0.0

Schemas

Original schema (A)

before

Paste the current schema — one or more CREATE TABLE statements.

Updated schema (B)

after

Paste the new schema to compare against A.

Differences

Suggested migration SQL 0 statements

Best-effort ALTER TABLE statements generated from the diff. Review and adapt before running against a real database.


            

How it works

Each side is parsed in the browser into tables, columns, primary keys, indexes, foreign keys and checks, then compared table by table. Identifiers are matched case-insensitively, type and default values are normalised, and table options such as ENGINE or AUTO_INCREMENT are ignored so only structural changes show up. Comments, strings and parentheses are handled correctly while parsing. Nothing is uploaded — the comparison happens on this page.