Skip to content

Commit

Permalink
make sure to run db migrations on sdtartup
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Jul 27, 2024
1 parent 09e5f9e commit 108e8f8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<RunnerQueue>();
Expand Down

0 comments on commit 108e8f8

Please sign in to comment.