The Cutover
Rehearse it before you do it. Migrate a copy, run the application against it, and work through the list of things that break. Then throw that copy away and do it again from the top, because the second run is the one that tells you your notes are complete.
Sequences need resetting. Move rows with their ids intact and Postgres does not know the sequence should now start after the highest one. The next insert collides, immediately and confusingly. Reset every sequence as the last step of the migration, and write it into the script rather than remembering.
Have a way back. Take a backup you have actually restored from once, not one you assume works. A backup nobody has ever restored is a hope.
Write the rollback plan before the migration, when you are calm, rather than during it when you are not.
Mark this lesson complete
Signed in, your progress follows you to every device.