diff --git a/Program.cs b/Program.cs index 5595ac0..e98a84e 100644 --- a/Program.cs +++ b/Program.cs @@ -89,6 +89,15 @@ public static void Main(string[] args) } } + // Database migration + Log.Information("Running Database migrations..."); + using (var db = new ActionsRunnerContext()) + { + db.Database.Migrate(); + } + Log.Information("Migrations complete."); + + WebApplicationBuilder builder = WebApplication.CreateBuilder(args); builder.Services.AddSerilog(); builder.Services.AddSingleton();