Schema Diff
Compare two versions of your CREATE TABLE definitions and get a readable list of changes plus migration SQL for PostgreSQL, MySQL, SQL Server, or Snowflake.
How to compare two database schemas
- Paste the current
CREATE TABLEstatements into Before and the desired ones into After. You can paste a whole schema dump with many tables. - Review Changes: new and dropped tables, added and removed columns, and changes to type, nullability, default, and primary key.
- Choose your database and copy the generated Migration SQL.
Before you run the migration
Generated SQL is a starting point, not a substitute for review. Dropping a column or table deletes data. A column that looks removed and added may really be a rename; the tool flags likely renames so you can use RENAME COLUMN instead and keep the data. Changing a column to NOT NULL fails if existing rows contain nulls, so backfill first. Test the migration on a copy of the database.
Equivalent type spellings, such as INT and INTEGER, or VARCHAR and CHARACTER VARYING, are treated as the same type, so they don't show up as false changes.
Frequently asked questions
Which SQL statements does it understand?
CREATE TABLE statements, including IF NOT EXISTS, schema-qualified and quoted names, column types, NOT NULL, DEFAULT, inline PRIMARY KEY, and table-level PRIMARY KEY constraints. Other statements in the input are ignored.
Does it detect renamed columns?
A rename looks like one column removed and another added. When a removed and an added column in the same table have the same type, the change is flagged as a possible rename so you can decide.
Is my schema uploaded?
No. Parsing and comparison run in your browser. Your DDL never leaves your device.