© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
192 replies
TheCultOfRa

How does EFCore Migrations work for actual deployment?

So I understand that when locally developing I can do
Add-Migration
Update-Database
Add-Migration
Update-Database


and that I can even start the initial migration on startup via
ApplicationDbContext.Database.Migrate
ApplicationDbContext.Database.Migrate
but this doesn't seem encouraged in production.

but when say deploying my app as a docker container, how do I exactly run those same commands? Do I do them as part of my dockerfile or dockercompose or something?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements
Next page

Similar Threads

❔ EFCore migrations
C#CC# / help
3y ago
❔ EFCore SQLITE Migrations on Server
C#CC# / help
3y ago
❔ EFCore migrations from existent database
C#CC# / help
3y ago
EFCore Database Update and Migrations Add will not work
C#CC# / help
3y ago