From a51e61aabc331313c16f7ff88ed36d065b5452e1 Mon Sep 17 00:00:00 2001 From: Carl Tibule Date: Wed, 10 Apr 2024 20:52:31 -0500 Subject: [PATCH] Attempting to fix code first migrations not running against a fresh db --- .woodpecker/.api_uploadimage.yaml | 2 ++ API/YABA.API/Program.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.woodpecker/.api_uploadimage.yaml b/.woodpecker/.api_uploadimage.yaml index bcbffb7..c146b11 100644 --- a/.woodpecker/.api_uploadimage.yaml +++ b/.woodpecker/.api_uploadimage.yaml @@ -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: diff --git a/API/YABA.API/Program.cs b/API/YABA.API/Program.cs index 5d27bf3..4ca46e3 100644 --- a/API/YABA.API/Program.cs +++ b/API/YABA.API/Program.cs @@ -97,7 +97,7 @@ var app = builder.Build(); // Run database migrations using (var scope = app.Services.CreateScope()) { - var yabaDbContext = scope.ServiceProvider.GetRequiredService(); + var yabaDbContext = scope.ServiceProvider.GetRequiredService(); yabaDbContext.Database.Migrate(); }