1 Commits

Author SHA1 Message Date
a51e61aabc Attempting to fix code first migrations not running against a fresh db
All checks were successful
ci/woodpecker/tag/api_build Pipeline was successful
ci/woodpecker/tag/api_uploadimage Pipeline was successful
2024-04-10 20:52:31 -05:00
2 changed files with 3 additions and 1 deletions

View File

@ -25,6 +25,8 @@ steps:
context: ./API
dockerfile: ./API/YABA.API/Dockerfile
tags_file: tags.txt
platforms:
- linux/amd64
username:
from_secret: gitea_yaba_registry_username
password:

View File

@ -97,7 +97,7 @@ var app = builder.Build();
// Run database migrations
using (var scope = app.Services.CreateScope())
{
var yabaDbContext = scope.ServiceProvider.GetRequiredService<YABAReadWriteContext>();
var yabaDbContext = scope.ServiceProvider.GetRequiredService<YABABaseContext>();
yabaDbContext.Database.Migrate();
}