PostgreSQL 17 runners are live
All rules

SDB701[high]History

Already-merged migration edited

Editing a migration that's already on the base branch diverges from production history.

Why it's risky in PostgreSQL

Environments that already applied the original file will never run your edit. Add a new migration instead.

What triggers it, and the safer way

unsafe.sql
-- modifying 0031_create_orders.sql after it was merged
safer.sql
-- create 0059_fix_orders.sql with the change

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
-- shadowdb:allow SDB701 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.