Phoenix application code and Ecto migration rollback: keeping schema and code in sync after schema changes
Goal: Ensure that after rolling back a migration, the deployed Phoenix application code remains compatible with the resulting database schema, avoiding missing columns or tables that the code expects. Constraints: Ecto’s change/0 can automatically reverse only a subset of schema operations; dropping columns or tables loses data unless a compensating step is