Ajout de 2 workflows pour les merges et reviews
All checks were successful
Generation data pour merge sur master / generateData (push) Has been skipped
Generation data pour merge sur master / reviewProcess (push) Successful in 1m12s

This commit is contained in:
2024-09-07 16:45:56 +02:00
parent aa2694585e
commit cd4788b2b0
10 changed files with 120 additions and 28 deletions

View File

@@ -7,10 +7,6 @@
<UserSecretsId>aspnet-LudikZoneBlazor-b18f2a2e-d082-4232-8521-6cacaa2a4ba2</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<None Update="Data\app.db" CopyToOutputDirectory="PreserveNewest" ExcludeFromSingleFile="true" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="8.*" />

View File

@@ -74,4 +74,11 @@ app.MapRazorComponents<App>()
// Add additional endpoints required by the Identity /Account Razor components.
app.MapAdditionalIdentityEndpoints();
// Appliquer les migrations automatiquement lors du démarrage
using (var scope = app.Services.CreateScope())
{
var dbContext = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
dbContext.Database.Migrate(); // Applique les migrations
}
app.Run();

View File

@@ -1,12 +1,12 @@
{
"ConnectionStrings": {
"DefaultConnection": "DataSource=Data\\app.db;Cache=Shared"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"ConnectionStrings": {
"DefaultConnection": "host=localhost;username=admin;database=ludikZone;Pooling=false;Timeout=300;CommandTimeout=300;Port=5432;"
},
"AllowedHosts": "*"
}