How to Review a SQL Schema Change in 5 Minutes

April 30, 2026 ยท 6 min read ยท SchemaLens Team

Your pull request is approved. The migration looks simple โ€” just adding a column and an index. You merge it. Ten minutes later, production is down.

The column was NOT NULL without a default. The index creation locked the table for 90 seconds. And nobody caught it because the schema change was "too small to review carefully."

This is why every engineering team needs a fast, repeatable SQL schema review process. Not a 45-page document. A 5-minute checklist that catches the dangerous stuff before it ships.

In this guide, we'll walk through a practical workflow you can use today โ€” whether you're reviewing a migration PR or sanity-checking your own changes before deploy.

Why schema review matters

Code review is standard practice. Schema review rarely is. Yet schema changes are more dangerous than code changes because:

The good news: most catastrophic schema changes are obvious if you know what to look for. You don't need to be a database expert. You need a checklist.

The 5-minute schema review workflow

Step 1: Get the before and after schema 1 min

You can't review what you can't see. Start by generating the current schema and the proposed schema.

If you're using a migration framework (Liquibase, Flyway, Alembic):

If you're working with raw SQL:

Paste both schemas into a diff tool. Instantly, you'll see exactly what changed โ€” not just the migration file, but the semantic difference in the resulting schema.

Step 2: Look for destructive changes 1 min

These are the fastest way to break production. Scan for:

"Dropped columns are the easiest change to approve and the hardest mistake to undo."

Step 3: Check constraint safety 1 min

Constraints are silent killers on large tables:

Safe pattern for NOT NULL:

  1. Add the column as nullable
  2. Backfill with a script or batch update
  3. Add the NOT NULL constraint in a separate, small migration

Step 4: Verify index coverage 1 min

New foreign keys need backing indexes. Missing indexes on FK columns cause full table scans on joins โ€” and those get expensive fast as tables grow.

Ask yourself:

Step 5: Estimate the migration cost 1 min

Not all migrations are equal. A column rename on a 10-row table is instant. On a 10-million-row table, it can take hours.

Before approving, estimate:

If a migration is high-risk and high-duration, break it into smaller steps or run it during a maintenance window.

Make it automatic

The best schema review processes don't rely on human memory. They use automation:

SchemaLens can do all three. It runs in your browser for quick checks, in your terminal via npx schemalens-cli, and in CI via GitHub Actions or GitLab CI.

โšก Review your next schema change in 5 minutes

Paste your before and after schemas into SchemaLens and catch breaking changes before they reach production.

Start Reviewing โ†’

The one-question test

If you only have time for one question before approving a schema change, make it this:

"If this migration fails halfway through, what's the worst-case state of the database?"

If the answer makes you uncomfortable, the migration needs more review.

Related articles