๐Ÿšจ Breaking Change Detection

Catch breaking schema changes
before they hit production.

SchemaLens diffs your database schema on every pull request, flags breaking changes with a risk score, and posts the result as a PR comment โ€” so dangerous migrations never slip through.

Add GitHub Action ๐Ÿ”€ Try Public PR Diff Install GitHub App

Free forever for public repos and open-source projects.

What counts as a breaking schema change?

๐Ÿ”ด Dropped tables or columns

Removing a table or column that production code still references causes immediate errors.

๐Ÿ”ด Type narrowing

Changing VARCHAR(255) โ†’ VARCHAR(50) or INT โ†’ SMALLINT can truncate or overflow existing data.

๐ŸŸก Unsafe NOT NULL

Adding NOT NULL without a default value breaks every row that has a NULL in that column.

๐ŸŸก Dropped indexes or constraints

Removing unique constraints or indexes can cause duplicate data and sudden query slowdowns.

๐ŸŸข Safe changes

New tables, new nullable columns, and new indexes are usually safe and green-lit by SchemaLens.

๐ŸŸข Backward-compatible expansions

Widening a VARCHAR or adding a default value is safe and does not require a deploy order dance.

How it works in your PR workflow

1๏ธโƒฃ A PR touches a .sql file

SchemaLens GitHub Action or App detects the schema change and starts a diff.

2๏ธโƒฃ Base vs head are compared

The schema from the PR branch is compared against the target branch to find every table, column, index, and constraint change.

3๏ธโƒฃ Risk score + comment

A PR comment shows the diff summary, breaking changes, risk score, and migration SQL โ€” exactly where reviewers already look.

Example PR comment

This is what SchemaLens posts automatically when a breaking change is detected:

โš ๏ธ SchemaLens detected 1 breaking change (Risk: 72/100) ## Summary - 1 table modified - 1 column removed - 1 index added ## Breaking Changes | Table | Change | Severity | |-------|--------|----------| | users | DROP COLUMN phone | CRITICAL | ## Migration SQL ```sql ALTER TABLE users DROP COLUMN phone; CREATE INDEX idx_users_email ON users(email); ``` ๐Ÿ‘‰ Open full diff in SchemaLens
Generate a Real PR Comment โ†’

Pick your workflow

โš™๏ธ GitHub Action

Add a workflow file to your repo. Full control over gates, annotations, and breaking-change policies.

View Action โ†’

๐Ÿค– GitHub App

Zero-config install. SchemaLens comments on every PR that touches a schema file.

Install App โ†’

๐Ÿ”€ Public PR Viewer

Manually review any public GitHub PR's schema changes. Great for open-source contributions and demos.

Try Free โ†’

Never let a breaking schema change slip through again

Add SchemaLens to your PR workflow and get automatic schema diff comments on every migration.

Add GitHub Action Diff a Public PR