Migrations work beautifully in development. Then production has 40 million rows and an ALTER TABLE takes four hours.
The cause.
dotnet ef migrations add produces SQL that works. It doesn't produce SQL that's safe at scale.
Adding a non-nullable column to a table with millions of rows generates a migration that locks the table while backfilling a default. In development, insta... https://ahex.co/asp-dot-net-core/
Why Do EF Core Migrations Lock Tables in Production?
Internet - 4 hours ago ahextech901Web Directory Categories
Web Directory Search
New Site Listings