9 Handling database migrations
This chapter covers
- Different ways to create commands to update a database’s structure
- Three starting points from which you create database structure changes
- How to detect and fix database structure changes that would lose data
- How the characteristics of your application affect the way you apply a database change
This chapter covers ways of changing the structure of a database, referred to as migrating a database. The structure of the database is called the database schema; it consists of the tables, columns, constraints, and so on that make up a database. Creating and updating a database schema can seem to be simple because EF Core provides a method called Migrate to do it all for you: you create your entity ...
Get Entity Framework Core in Action, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.