Backend & systems·Data modelling and storage engines
you have to change the shape of a table that is being read and written right now, without stopping either.
Schema migration
Also calledDDL migration, database migration
A versioned change to the database structure, applied in order and tracked alongside the code. The hard part is not the DDL but the overlap: old and new application versions run simultaneously during a deploy, so every migration must be compatible with both. A migration that takes a lock on a large table can be indistinguishable from an outage.