Compare two schemas and get the changes between them, each marked safe, needs review or destructive, with reviewable migration SQL that is never executed.
Waiting for two schemas
Paste the current schema on the left and the intended one on the right.
Waiting for both schemas
Paste the current schema and the intended one.
SQL Schema Diff runs entirely on your device — nothing is uploaded, and no database is contacted.
You’re on the Free plan. Compare plans
Every change carries its risk, because "the migration ran" and "the migration was safe" are different claims, and a diff that only lists changes invites you to confuse them.
**Safe** means it cannot fail against existing rows and destroys nothing — a new nullable column, a new index. **Needs review** means it can fail depending on the data already there: adding NOT NULL to a column holding nulls fails, adding UNIQUE to a column with duplicates fails, narrowing a type truncates or errors depending on the engine. None of those can be judged from the schema alone, which is precisely why they need a person. **Destructive** means data is gone and no rollback script brings it back.
A column rename cannot be detected, and the tool says so rather than guessing. A rename looks exactly like a drop plus an add, and guessing wrong turns a safe migration into a destructive one — so the ambiguity is reported instead of resolved.
The generated SQL is a starting point to read. It is never executed, no database is contacted, and the ordering of statements in a real migration often matters in ways a diff cannot see — adding a foreign key before the table it points at exists, for one.
The dialect matters for the output, not the comparison. PostgreSQL will drop a column in a transaction and MySQL will not, which is the difference between a failed migration you can retry and one that leaves the schema half-changed.
Because whether it works depends on data the schema cannot show. If every existing row has a value it succeeds; if any row holds a null it fails. The safe sequence is to add the column nullable, backfill, then add the constraint.
No, and guessing would be dangerous. A rename is indistinguishable from a drop plus an add in two schema snapshots, and getting it wrong turns a safe change into data loss. The tool reports both halves and lets you decide.
It is safe to read. Ordering across tables, backfills, and locking behaviour on a large table are all things a schema diff cannot see — and on a busy table an ALTER can hold a lock long enough to matter.
That applying it removes data no rollback can restore: dropping a column, dropping a table. A rollback script can recreate the column; it cannot recreate what was in it.
No. Both schemas are text you paste, parsed in your browser. Nothing is executed and nothing is contacted.