Weekly series

Breaking Change of the Week

Real database schema changes that break production โ€” and how to catch them in your next PR.

New breaking change every Monday. Get it by email โ†’

This week's breaking change

A common schema diff that looks safe in isolation but breaks something downstream.

Week of June 8, 2026

Dropping a column that a view still references

You rename or drop users.phone because the mobile app no longer uses it. But a Postgres view named user_profiles still selects phone. The migration succeeds, and then every query against the view fails.

Before
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  email VARCHAR(255) NOT NULL,
  phone VARCHAR(20)
);

CREATE VIEW user_profiles AS
SELECT id, email, phone FROM users;
After
CREATE TABLE users (
  id SERIAL PRIMARY KEY,
  email VARCHAR(255) NOT NULL
);

-- View is now broken:
CREATE VIEW user_profiles AS
SELECT id, email, phone FROM users;

Why it breaks: Postgres allows dropping the underlying column even when a view depends on it. The failure happens at query time, not migration time, so your CI may be green while production is red.

How SchemaLens catches it: The diff flags the dropped column, and our view-dependency check warns that user_profiles references it. Add the SchemaLens GitHub Action to see the warning directly in your PR.

Try this diff in SchemaLens

Archive

Previous breaking changes. Bookmark this page โ€” the archive grows every week.

Week of June 1, 2026

Adding NOT NULL without a default value

You mark orders.status as NOT NULL to enforce data quality. On an empty dev database it works fine. In production, existing rows have NULL values and the migration fails โ€” or worse, the deploy blocks and rolls back.

Migration failureData loss risk
Week of May 25, 2026

Shrinking a VARCHAR column

Changing VARCHAR(255) to VARCHAR(50) to match validation rules silently truncates or rejects existing data that exceeds the new limit. The diff looks like a minor cleanup; the impact is a data-integrity incident.

Data truncationSilent bug
Week of May 18, 2026

Renaming a table without updating foreign keys

user_accounts becomes accounts. The migration renames the table but leaves foreign keys in posts, comments, and payments pointing at the old name. Queries fail and reports break.

FK breakageQuery failure
Week of May 11, 2026

Changing INTEGER to SMALLINT

You switch INTEGER to SMALLINT to save space. It works until a customer ID exceeds 32,767 and the insert overflows. The migration succeeds because the database doesn't validate all existing rows against the new type.

OverflowType change
Week of May 4, 2026

Dropping an index a query planner relies on

idx_orders_created_at looks unused in slow-query logs, so you drop it. The next day a reporting query that filtered by created_at scans a 100M-row table and times out.

PerformanceIndex drop
Week of April 27, 2026

Removing a default value from a required column

You remove the default on invoices.currency because the app now sets it explicitly. Legacy integrations that insert rows without specifying currency start failing with NOT NULL violations.

Integration breakDefault removal

Catch the next one before it ships

Add SchemaLens to your CI/CD pipeline and see breaking changes highlighted in every pull request.