First Production Migration Checklist
Use this before the first migration that matters. The goal is not speed. The goal is to avoid discovering missing assumptions during cutover.
Config
Section titled “Config”- Start from a
minimal-safeexample, notrecreate-fast. - Keep
on_schema_exists = "error"so you do not destroy a previous rehearsal by mistake. - Keep
unlogged_tables = falseunless you are explicitly running a disposable environment. - Turn on
validation = "row_count"for the rehearsal that is meant to prove operational readiness.
Source and target
Section titled “Source and target”- Confirm the source DSN points at the correct database.
- Confirm the target DSN points at the intended PostgreSQL database.
- If the source stays live during the run, decide whether
source_snapshot_mode = "single_tx"is needed. - Confirm required PostgreSQL extensions are installed or configured to auto-create.
Plan output
Section titled “Plan output”- Run
pgferry plan migration.toml. - Read every warning and assign an owner.
- Decide what happens to views, routines, and source triggers.
- Decide how generated-column expressions will be recreated if the application depends on them.
- Decide whether skipped indexes need PostgreSQL equivalents before the application cutover.
Dry run discipline
Section titled “Dry run discipline”- Test the exact hook files you intend to use in production.
- Keep the config stable once you start a resumable rehearsal.
- Record expected runtime, largest tables, and any cleanup steps while rehearsing.
- Confirm application connectivity and basic query behavior against the migrated target before calling the rehearsal complete.