← Back
Nick Chapsas December 17, 2024 19m

The Correct Way to Run Database Migrations in EF Core

Summary

The main theme is the correct way to manage database migrations in .NET for production environments. Key subjects discussed include avoiding migrations on application startup, the dangers of high database permissions for applications, and the recommendation to treat migrations as a release step executed by a pipeline. The practical takeaway is to use tooling like `dotnet ef migrations bundle` within a release pipeline, rather than embedding migration logic directly into application startup code, to prevent issues like deadlocks, data corruption, and security vulnerabilities.

View original episode ↗