PostgreSQL 17 runners are live
All rules

SDB702[medium]History

Migration version out of order

A version lower than the latest on the base branch may be skipped by your tool.

Why it's risky in PostgreSQL

Some tools refuse or silently skip migrations older than the newest applied one.

What triggers it, and the safer way

unsafe.sql
-- 0040_x.sql added while 0057 is the latest on main
safer.sql
-- rename to the next free version

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 SDB702 <why this is safe here>

Applies to PostgreSQL 14, 15, 16, 17.