Database migration
A database migration is a controlled change to a database’s schema, data, or associated structures as requirements evolve.
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.
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
- JSONJSON is a language-independent text-based data-interchange format that represents structured values using objects, arrays, strings, numbers, booleans, and null.
- SQLSQL is a standardized declarative language for defining, querying, and manipulating data in relational database systems.
- database tableA database table is a relational data structure that organizes records into rows whose values correspond to defined columns.
Related concepts
- EnsureCreatedcontrasts with · EnsureCreated is an Entity Framework Core method that creates a database and its schema if they do not exist, without applying migrations.
- Entity Framework Coreused by · Entity Framework Core is a cross-platform object-relational mapper for .NET that enables applications to work with databases through .NET objects and queries.
- arbitrary-precision integeruses · An integer representation that can accommodate values beyond fixed-width limits by expanding storage as needed, without loss of integer precision.
- columnproduces · A column is a vertical sequence or region of cells or entries in a table, grid, or matrix; in tabular data, it represents one attribute across records.
- database tableuses · A database table is a relational data structure that organizes records into rows whose values correspond to defined columns.
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.


