2 Commits

Author SHA1 Message Date
302fdc14a6 Merge pull request 'Attempting to fix code first migrations not running against a fresh db' (#40) from api/features/CodeFirstMigrationsNotWorking into api/develop
All checks were successful
ci/woodpecker/push/api_build Pipeline was successful
ci/woodpecker/tag/api_build Pipeline was successful
ci/woodpecker/tag/api_uploadimage Pipeline was successful
Reviewed-on: #40
2024-04-10 21:43:47 -05:00
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 context: ./API
dockerfile: ./API/YABA.API/Dockerfile dockerfile: ./API/YABA.API/Dockerfile
tags_file: tags.txt tags_file: tags.txt
platforms:
- linux/amd64
username: username:
from_secret: gitea_yaba_registry_username from_secret: gitea_yaba_registry_username
password: password:

View File

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