A database migration is a recorded change to the way an app's stored information is organized. It is like updating a filing cabinet plan—for example, adding a new drawer or changing a label—while keeping the papers that are already inside.

An app may need a migration when it starts saving a new detail, such as a user's preferred language. The migration tells the database how to adjust its structure so the app can use that detail.

Changing stored data can be risky, so teams usually test a migration and keep a backup before applying it to important information.