dotnet / efcore

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.
https://docs.microsoft.com/ef/
MIT License
13.79k stars 3.19k forks source link

Tools: Warn when pending model changes #22105

Open bricelam opened 4 years ago

bricelam commented 4 years ago

We should warn during the following commands when there are pending model changes that can be added to a new migration.

bricelam commented 4 years ago

We should also consider adding sugar to the product (e.g. dbContext.Database.HasPendingModelChanges()) to do this since I've seen a lot of users asking how to over the years. (PR #31164)

bricelam commented 4 years ago

Some progress was made toward this in PR #14122

bricelam commented 4 years ago

We should also double check that the warning surfaces as part of the GenerateEFSQLScripts task and Publish dialog.