Hello Devs, im looking for the best aproach to update the app database (DotNet WebApi) when deploying to a Docker Container. This is what i have so far:
1 - Tried to run a migration inside the startup class using context.Database.Migrate(), for some reason didnt work.
2 - Compose build and up, then manually 😅 run bash inside the aspnet container, install ef tool, add the migration and update database.
3 - Get the SQL script runing DotNet ef migrations script and putting it inside a seed. SQL on the Postgres container.
Im wondering if there is a automatic way to do that?