# Change database schemas in compatible stages
URL: https://wwadd.dev/moves/testing-shipping/compatible-schema-migrations

Use an expand-and-contract rollout: add the new structure first, deploy code compatible with old and new versions, backfill and validate data, then retire the old structure after the rollback window. Estimate locking and table rewrite costs before production changes. Application rollback is not automatically a database rollback.

Verified: 2026-09-30

Source: [Official guidance](https://www.postgresql.org/docs/current/ddl-alter.html)

