fix: Production 로그 누락 및 DB 마이그레이션 미적용 수정 (#277)
Some checks failed
SPMS_API/pipeline/head There was a failure building this commit

Reviewed-on: https://git.ipstein.myds.me/SPMS/SPMS_API/pulls/278
This commit is contained in:
김선규 2026-03-18 00:24:43 +00:00
commit bb748a66a3
2 changed files with 9 additions and 1 deletions

View File

@ -73,7 +73,14 @@ builder.Services.AddRateLimiter(options =>
var app = builder.Build(); var app = builder.Build();
// ===== 5. Middleware Pipeline ===== // ===== 5. DB 마이그레이션 자동 적용 =====
using (var scope = app.Services.CreateScope())
{
var db = scope.ServiceProvider.GetRequiredService<SPMS.Infrastructure.AppDbContext>();
await db.Database.MigrateAsync();
}
// ===== 6. Middleware Pipeline =====
app.UseMiddlewarePipeline(); app.UseMiddlewarePipeline();
app.Run(); app.Run();

View File

@ -45,6 +45,7 @@
} }
}, },
"WriteTo": [ "WriteTo": [
{ "Name": "Console" },
{ {
"Name": "File", "Name": "File",
"Args": { "Args": {