Compare database schemas before migration

Diff two database schema snapshots in your browser so you can spot table, column, type, and index changes before a migration review.

Open this example in Database Schema Diff

Open the tool, then paste the sample input below. Everything runs locally in your browser.

Open this example in Database Schema Diff →

The problem

Schema changes often arrive as long DDL files or exported definitions. Before approving a migration, reviewers need to see which tables changed, whether columns were dropped, and which differences might require a manual migration step.

Sample input

Before and after DDL
Before:
CREATE TABLE users (id uuid PRIMARY KEY, email text NOT NULL);

After:
CREATE TABLE users (id uuid PRIMARY KEY, email text NOT NULL, last_login timestamptz);

Expected output

Schema diff summary
Added column: users.last_login timestamptz
No removed tables
No removed columns

How to do it

  1. Paste the current schema in the left input.
  2. Paste the proposed schema in the right input.
  3. Run the diff.
  4. Review added, removed, and changed objects.
  5. Copy the summary into your migration review.

Common mistakes

  • Comparing generated SQL that includes environment-specific comments.
  • Ignoring removed nullable columns because the migration still applies.
  • Reviewing only table names and missing type changes.
  • Not checking indexes and constraints after column changes.

Related tools

FAQ

Can I compare production and staging schemas?

Yes. Paste exported schema text from each environment. The comparison runs locally in your browser.

Does this run SQL against my database?

No. It compares pasted schema text and does not connect to any database.

What should I check before approving a migration?

Look for dropped columns, type changes, renamed objects, and missing indexes or constraints.

Is my data uploaded anywhere?

No. This workflow runs locally in your browser unless you explicitly copy or share the result yourself.

This guide uses browser-local tooling. Avoid pasting production secrets unless you understand what the tool displays and shares.

Explore related tools

Continue with adjacent browser-based tools for the same workflow.

View API and contract tools →

Compare schemas before a migration: quick answer

Use this workflow when two CREATE TABLE dumps, migration previews, or ORM-generated schemas need a quick review before release. Paste or load the artifact into the linked tool, run the local check, then copy only the safe result or summary into your PR, ticket, or test notes.

What to verify

Look for dropped columns, type changes, nullable changes, default changes, and indexes that are missing from one side. If a result will be shared outside your team, run a privacy or secret scan first and replace real values with safe examples.

Recommended next steps

Practical example and expected result

Diff two database schema snapshots in your browser so you can spot table, column, type, and index changes before a migration review. In practice, this is most useful when you need a quick, repeatable check on a schema document before adding it to a ticket, pull request, test fixture, or support note.

A realistic input for this workflow is Before: CREATE TABLE users (id uuid PRIMARY KEY, email text NOT NULL); After: CREATE TABLE users (id uuid PRIMARY KEY, email text NOT NULL, .... The expected result should resemble Added column: users.last_login timestamptz No removed tables No removed columns, with the same important values preserved.

Troubleshooting checklist

  • Confirm you copied the complete schema document and not only a partial line or truncated preview.
  • Run the local tool once with a safe sample, then repeat with the real data only if your team policy allows it.
  • Check quoting, escaping, whitespace, encoding, timestamps, and environment-specific values before trusting the result.
  • Before sharing output, remove secrets, tokens, cookies, customer data, and production hostnames that are not needed for the review.

Next useful steps