This commit is contained in:
2026-02-06 09:17:51 +01:00
parent 3f474c4d39
commit 2e40d48a9a
17 changed files with 1659 additions and 329 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,79 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class CapoareaSuProvIstat : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Utente_Province_ProvinciaIstatId",
table: "Utente");
migrationBuilder.DropIndex(
name: "IX_Utente_ProvinciaIstatId",
table: "Utente");
migrationBuilder.DropColumn(
name: "ProvinciaIstatId",
table: "Utente");
migrationBuilder.AddColumn<Guid>(
name: "CapoareaId",
table: "Province",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Province_CapoareaId",
table: "Province",
column: "CapoareaId");
migrationBuilder.AddForeignKey(
name: "FK_Province_Utente_CapoareaId",
table: "Province",
column: "CapoareaId",
principalTable: "Utente",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Province_Utente_CapoareaId",
table: "Province");
migrationBuilder.DropIndex(
name: "IX_Province_CapoareaId",
table: "Province");
migrationBuilder.DropColumn(
name: "CapoareaId",
table: "Province");
migrationBuilder.AddColumn<Guid>(
name: "ProvinciaIstatId",
table: "Utente",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Utente_ProvinciaIstatId",
table: "Utente",
column: "ProvinciaIstatId");
migrationBuilder.AddForeignKey(
name: "FK_Utente_Province_ProvinciaIstatId",
table: "Utente",
column: "ProvinciaIstatId",
principalTable: "Province",
principalColumn: "Id");
}
}
}

View File

@ -621,6 +621,9 @@ namespace StandManager.Infrastructure.Migrations
b.Property<bool>("CapoareaDaVerificare")
.HasColumnType("bit");
b.Property<Guid?>("CapoareaId")
.HasColumnType("uniqueidentifier");
b.Property<DateTime>("DataCreazione")
.HasColumnType("datetime2");
@ -646,6 +649,8 @@ namespace StandManager.Infrastructure.Migrations
b.HasKey("Id");
b.HasIndex("CapoareaId");
b.HasIndex("IdUtenteCreazione");
b.HasIndex("IdUtenteModifica");
@ -862,9 +867,6 @@ namespace StandManager.Infrastructure.Migrations
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<Guid?>("ProvinciaIstatId")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("RuoloId")
.HasColumnType("uniqueidentifier");
@ -880,8 +882,6 @@ namespace StandManager.Infrastructure.Migrations
b.HasIndex("IdUtenteModifica");
b.HasIndex("ProvinciaIstatId");
b.HasIndex("RuoloId");
b.ToTable("Utente");
@ -1160,6 +1160,10 @@ namespace StandManager.Infrastructure.Migrations
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
{
b.HasOne("StandManager.Domain.Entita.Utente", "Capoarea")
.WithMany()
.HasForeignKey("CapoareaId");
b.HasOne("StandManager.Domain.Entita.Utente", "UtenteCreazione")
.WithMany()
.HasForeignKey("IdUtenteCreazione");
@ -1168,6 +1172,8 @@ namespace StandManager.Infrastructure.Migrations
.WithMany()
.HasForeignKey("IdUtenteModifica");
b.Navigation("Capoarea");
b.Navigation("UtenteCreazione");
b.Navigation("UtenteModifica");
@ -1253,18 +1259,12 @@ namespace StandManager.Infrastructure.Migrations
.WithMany()
.HasForeignKey("IdUtenteModifica");
b.HasOne("StandManager.Domain.Entita.ProvinciaIstat", "ProvinciaIstat")
.WithMany("UtentiList")
.HasForeignKey("ProvinciaIstatId");
b.HasOne("StandManager.Domain.Entita.Ruolo", "Ruolo")
.WithMany("Utenti")
.HasForeignKey("RuoloId");
b.Navigation("Capoarea");
b.Navigation("ProvinciaIstat");
b.Navigation("Ruolo");
b.Navigation("UtenteCreazione");
@ -1294,11 +1294,6 @@ namespace StandManager.Infrastructure.Migrations
b.Navigation("IscrizioniEvento");
});
modelBuilder.Entity("StandManager.Domain.Entita.ProvinciaIstat", b =>
{
b.Navigation("UtentiList");
});
modelBuilder.Entity("StandManager.Domain.Entita.Ruolo", b =>
{
b.Navigation("Permessi");