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
-- modifying 0031_create_orders.sql after it was merged-- create 0059_fix_orders.sql with the changeSuppress it when you're sure
Put this comment on the line before the statement. The reason is required and shows in the report.
-- shadowdb:allow SDB701 <why this is safe here>Applies to PostgreSQL 14, 15, 16, 17.