migration

This commit is contained in:
Tizian.Breuch
2025-07-23 11:02:56 +02:00
parent d2c99fb32a
commit 0966198c70
5 changed files with 2 additions and 1251 deletions

View File

@@ -117,7 +117,7 @@ using (var scope = app.Services.CreateScope())
try
{
var context = services.GetRequiredService<ApplicationDbContext>();
context.Database.Migrate(); // Wendet ausstehende Migrationen an
context.Database.Migrate();
}
catch (Exception ex)
{
@@ -126,13 +126,6 @@ using (var scope = app.Services.CreateScope())
}
}
// --- START: HTTP REQUEST PIPELINE KONFIGURIEREN ---
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
// Swagger immer aktivieren (auch in Produktion f<>r API-Dokumentation)
// F<>r die Produktion w<>re es sicherer, dies an `app.Environment.IsDevelopment()` zu binden
// if (app.Environment.IsDevelopment())