Skip to content

postgres/edited-migrations

Checks that no migration at or before postgres.frozen_through differs from its committed text.

Part of the postgres configuration, at the recommended level. It runs at the commit stage, once per scope. gspot runs this check itself.

An applied migration never runs again, so an edit reaches only new databases, and environments drift apart.

Restore the file with git checkout, and write the change as a new migration.

An edit to a committed migration reports a finding. Restore the original file, and write the change as a new migration.

Turn it off for some files, with a reason:

gspot ignore postgres/edited-migrations --paths "<glob>" --reason "<why>"