Skip to content

Commit

Permalink
Added Migration
Browse files Browse the repository at this point in the history
  • Loading branch information
philgei committed Nov 25, 2024
1 parent 5c0fb13 commit 2817ecc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions AdLerBackend.Infrastructure/ConfigureServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using AdLerBackend.Infrastructure.Repositories.Worlds;
using AdLerBackend.Infrastructure.Services;
using AdLerBackend.Infrastructure.Storage;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;

namespace AdLerBackend.Infrastructure;
Expand All @@ -34,6 +35,10 @@ public static IServiceCollection AddInfrastructureServices(this IServiceCollecti
else
services.AddDbContext<BaseAdLerBackendDbContext, ProductionContext>();

// Migrate and log that to the console
services.BuildServiceProvider().GetService<BaseAdLerBackendDbContext>().Database.Migrate();



return services;
}
Expand Down

0 comments on commit 2817ecc

Please sign in to comment.