How do you run a migration on a large table without downtime?
Assume the table is locked for as long as the statement takes, and shape the change so it is not. Add columns as nullable without a default, backfill in batches outside the migration, add indexes concurrently, and only then add the constraint. Renaming and dropping are the dangerous ones because old code is still running during the deploy — do them in two releases with a dual-write in between.