Update dependencies
This commit is contained in:
parent
680458b0f3
commit
25876813e5
@ -9,10 +9,10 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DbUp-PostgreSQL" Version="5.0.40" />
|
||||
<PackageReference Include="DbUp-PostgreSQL" Version="6.0.3" />
|
||||
<PackageReference Include="EFCore.NamingConventions" Version="9.0.0" />
|
||||
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.2" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -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();
|
||||
|
@ -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/"
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user