Fix
This commit is contained in:
1314
StandManager.Infrastructure/Migrations/20260206070903_CapoareaSuProvIstat.Designer.cs
generated
Normal file
1314
StandManager.Infrastructure/Migrations/20260206070903_CapoareaSuProvIstat.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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");
|
||||
|
||||
Reference in New Issue
Block a user