using LANCommander.SDK.Migrations; using LANCommander.SDK.Services; using LANCommander.Server.Migrations; namespace LANCommander.Server.Startup; public static class Migrations { public static WebApplicationBuilder AddMigrations(this WebApplicationBuilder builder) { // Individual settings file migrations builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); // Database location migrations builder.Services.AddScoped(); // Individual path migrations builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); return builder; } public static async Task RunApplicationMigrationsAsync(this WebApplication app) { var migrationService = app.Services.GetRequiredService(); await migrationService.MigrateAsync(); return app; } }