PostgreSQL 17 runners are live
All rules

FRN703[high]History

Production schema drifted from the migrations

Production has a schema object the migrations don't create, lacks one they do, or defines it differently.

Why it's risky in PostgreSQL

A drift check compares the schema your default branch's migrations build with a schema-only dump of production. A difference means something changed production by hand, or a migration never ran there.

Every verification assumes production matches the migrations, so a drifted object can make a migration that passed here fail in production.

What triggers it, and the safer way

unsafe.sql
-- Run by hand in production, never added as a migration:
CREATE INDEX CONCURRENTLY customers_email_idx ON customers (email);
safer.sql
-- db/migrations/0060_customers_email_idx.up.sql
CREATE INDEX CONCURRENTLY IF NOT EXISTS customers_email_idx ON customers (email);

Suppress it when you're sure

Put this comment on the line before the statement. The reason is required and shows in the report.

suppression
-- fronelta:allow FRN703 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.