database migration

A scripted, versioned change to a database's structure, such as adding a table or a constraint.

In more detail

Migrations are applied in order and kept with the application code so every environment ends up with the same schema. Tools record which migrations have already run, so each environment applies only the ones it is missing.

Examples

In AWS: A planned change to a database’s structure or data, such as adding a column, applied in a controlled order.
dotnet ef migrations add InitialCatalog
dotnet ef database update
In the browser: In IndexedDB, migrations run in onupgradeneeded, checking the old version number and applying each step needed to reach the new one.
Moving to a normalised design is done as a migration that adds the new tables and constraints together.
In this course: Migrations can only be proven by running them against the real engine, so a container-based test that applies them from scratch is valuable. Run the same migrations in tests that production runs, so a broken migration fails the build instead of a deployment.

Related terms

Taught in

References

Certification courses