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.
Original schema (A)
beforePaste the current schema — one or more CREATE TABLE statements.
Updated schema (B)
afterPaste 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.