liveBook · Manning

Database migration

Also called schema migration

A database migration is a controlled change to a database’s schema, data, or associated structures as requirements evolve.

How 3 Manning books explain it

Grokking Software Architecture

A controlled change to a database's structure, such as its tables or columns.

How it is used
Manages database structure changes as application requirements evolve and deployments introduce new service versions.
How deep it goes
Defines version-controlled upgrades and rollbacks, then details Expand/Contract phases and concurrency risks without showing a complete migration script.
Examples
Uses a growing to-do app and a customer phone column replacement to illustrate schema changes.
What you can do after
Evaluate/understand how to stage a schema change while old and new service versions share a database.

Read how Grokking Software Architecture explains database migration →

Rust Web Development

A database migration is a versioned change to a database schema or data that can be applied and reverted.

How it is used
Keeps application databases current across developer setup and deployment without manual table creation.
How deep it goes
Walks through creating, filling, running, and reverting timestamped migration files, including execution at server startup.
Examples
Creates questions, answers, and accounts tables, then adds account ID columns to existing resource tables.
What you can do after
Apply migrations using SQLx CLI or the migrate! macro, and revert them with the CLI.

Read how Rust Web Development explains database migration →

Building Distributed Applications that Work

A database migration is a controlled change to a database schema or associated database objects across application versions.

How it is used
Updates a SQL-backed application's schema as new versions are deployed through Aspire.
How deep it goes
Works through migration creation, version tracking, generated schema changes, and startup execution; does not detail the manual repair for EnsureCreated databases.
Examples
Uses an online-shop API, an initial schema migration, an order-address column, and a hosted service that migrates before seeding.
What you can do after
Apply it via Entity Framework migrations and an Aspire-hosted service to run outstanding schema changes during deployment.

Read how Building Distributed Applications that Work explains database migration →

What to know first

Related concepts

Questions about database migration

What is database migration?

A database migration is a controlled change to a database’s schema, data, or associated structures as requirements evolve.

Which Manning books explain database migration?

Grokking Software Architecture, Rust Web Development and Building Distributed Applications that Work.

What should I know before learning database migration?

Manning books that teach database migration usually introduce JSON, SQL and database table first.

What is the difference between database migration and EnsureCreated?

A database migration is a controlled change to a database’s schema, data, or associated structures as requirements evolve. EnsureCreated is an Entity Framework Core method that creates a database and its schema if they do not exist, without applying migrations.

What is database migration also called?

Database migration is also called schema migration.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.