Database Migration

You might say

I need to add a phone column to our user table, but production already has tens of thousands of rows. How do we update the schema without losing data or causing downtime?

An ordered, versioned, and traceable set of steps for changing database structure or required data.Suppose users already contains live rows and a required status column is needed. A safe migration adds a compatible column, backfills old rows, verifies that no NULL values remain, and only then enforces the constraint. The migration tool records applied versions, but migration files are not data backups and do not guarantee lossless reversal.
DB MigrationSchema Migration
Further reading