diff --git a/Groceries.Data/Groceries.Data.csproj b/Groceries.Data/Groceries.Data.csproj
index 1261fac..8e87f7d 100644
--- a/Groceries.Data/Groceries.Data.csproj
+++ b/Groceries.Data/Groceries.Data.csproj
@@ -9,10 +9,10 @@
-
+
-
+
diff --git a/Groceries/Program.cs b/Groceries/Program.cs
index 75d62c1..880864f 100644
--- a/Groceries/Program.cs
+++ b/Groceries/Program.cs
@@ -1,4 +1,5 @@
using DbUp;
+using DbUp.Engine.Output;
using Groceries.Data;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.EntityFrameworkCore;
@@ -13,20 +14,6 @@ builder.Configuration
.AddIniFile(Path.Combine(dataDir, $"config_{env.EnvironmentName}.ini"), optional: true, reloadOnChange: true);
var dbConn = builder.Configuration["Database"]!;
-EnsureDatabase.For.PostgresqlDatabase(dbConn);
-
-var dbUpgradeResult = DeployChanges.To
- .PostgresqlDatabase(dbConn)
- .JournalToPostgresqlTable("public", "__dbup_migrations")
- .WithScriptsEmbeddedInAssembly(typeof(AppDbContext).Assembly)
- .WithTransactionPerScript()
- .Build()
- .PerformUpgrade();
-
-if (!dbUpgradeResult.Successful)
-{
- return -1;
-}
var dataProtection = builder.Services.AddDataProtection();
if (env.IsProduction())
@@ -58,6 +45,22 @@ app.MapStaticAssets();
app.MapControllers()
.WithStaticAssets();
-await app.RunAsync();
+var dbUpgradeLogger = new MicrosoftUpgradeLog(app.Logger);
+EnsureDatabase.For.PostgresqlDatabase(dbConn, dbUpgradeLogger);
-return 0;
+var dbUpgradeResult = DeployChanges.To
+ .PostgresqlDatabase(dbConn)
+ .JournalToPostgresqlTable("public", "__dbup_migrations")
+ .WithScriptsEmbeddedInAssembly(typeof(AppDbContext).Assembly)
+ .WithTransactionPerScript()
+ .LogTo(dbUpgradeLogger)
+ .Build()
+ .PerformUpgrade();
+
+if (!dbUpgradeResult.Successful)
+{
+ Environment.Exit(-1);
+ return;
+}
+
+app.Run();
diff --git a/Groceries/libman.json b/Groceries/libman.json
index 86c8a5d..5ba6c87 100644
--- a/Groceries/libman.json
+++ b/Groceries/libman.json
@@ -3,11 +3,11 @@
"defaultProvider": "unpkg",
"libraries": [
{
- "library": "@fontsource-variable/inter@5.1.1",
+ "library": "@fontsource-variable/inter@5.2.5",
"destination": "wwwroot/lib/inter/"
},
{
- "library": "@hotwired/turbo@8.0.12",
+ "library": "@hotwired/turbo@8.0.13",
"destination": "wwwroot/lib/hotwired/turbo/"
},
{