추가: 마이그레이션 러너 및 배포 가이드

- MigrationRunner 구현 (자동 DB 마이그레이션)
- Program.cs에 마이그레이션 자동 실행 추가
- 마이그레이션 SQL 파일을 임베드 리소스로 설정
- 완전한 배포 가이드 작성 (DEPLOYMENT_GUIDE.md)
- E2E 테스트 절차 포함
- 롤백 및 모니터링 가이드 추가

배포 준비 완료: Gitea CI/CD 자동 배포 활성화 가능

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-06-26 15:24:39 +09:00
parent b300cd7a59
commit b875538bb5
5 changed files with 370 additions and 0 deletions
+10
View File
@@ -22,6 +22,16 @@ builder.Services.AddApplication();
var app = builder.Build();
// Run migrations on startup
using (var scope = app.Services.CreateScope())
{
var connectionFactory = scope.ServiceProvider.GetRequiredService<TaxBaik.Domain.Interfaces.IDbConnectionFactory>();
var cs = builder.Configuration.GetConnectionString("Default")
?? throw new InvalidOperationException("Missing connection string");
var migrationRunner = new TaxBaik.Infrastructure.Data.MigrationRunner(cs, connectionFactory);
await migrationRunner.RunAsync();
}
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);