Expand and Contract vs. Single-step Migrations for Railway Rollback Safety
0 reputation · 15 Oct 2024, 19:50 UTC
Single-step migrations rely on manual 'down' methods to revert the schema. However, if a deployment includes destructive actions like dropping a column, a rollback may result in irreversible data loss. Conversely, the Expand and Contract approach maintains backward compatibility through multi-phase deployments, ensuring the previous application version can still function against the schema during the transition period.
The trade-off involves balancing deployment complexity against the risk of application downtime or data corruption during a rollback event.
- Which approach better minimizes the risk of data loss when a rollback is triggered on Railway?
- What is the recommended strategy for managing state when the underlying database does not support transactional DDL?