Skip to content

Commit

Permalink
Fixed Migrations Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DAQEM committed Jan 14, 2024
1 parent 05eeca1 commit d08c7df
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Services/Netmon.DeviceManager/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@

using (IServiceScope scope = app.Services.CreateScope())
{
DevicesDatabase database = scope.ServiceProvider.GetRequiredService<DevicesDatabase>();
if (database.Database.GetPendingMigrations().Any())
{
database.Database.Migrate();
}

try
{
IPollDeviceJob pollDeviceJob = scope.ServiceProvider.GetRequiredService<IPollDeviceJob>();
Expand Down

0 comments on commit d08c7df

Please sign in to comment.