Aggiunta migration/creazione DB Utls
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>6.16.2604.1616</Version>
|
||||
<Version>6.16.2604.1618</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -126,6 +126,23 @@ logger.Info("Singleton Route Manager registered");
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Blocco per la migrazione automatica del DB Utils...
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var services = scope.ServiceProvider;
|
||||
try
|
||||
{
|
||||
var context = services.GetRequiredService<MoonPro_UtilsContext>();
|
||||
context.Database.Migrate();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var migrateLogger = services.GetRequiredService<ILogger<Program>>();
|
||||
migrateLogger.LogError(ex, "Si è verificato un errore durante l'aggiornamento del database.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// aggiunt base URL x routing corretto
|
||||
string baseUrl = configuration.GetValue<string>("ServerConf:BaseUrlIoc") ?? "/MP/";
|
||||
app.UsePathBase(baseUrl);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MP-IOC </i>
|
||||
<h4>Versione: 6.16.2604.1616</h4>
|
||||
<h4>Versione: 6.16.2604.1618</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2604.1616
|
||||
6.16.2604.1618
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2604.1616</version>
|
||||
<version>6.16.2604.1618</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/MP.IOC.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/MP-IOC/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user