GuidComune
This commit is contained in:
1166
StandManager.Infrastructure/Migrations/20251222160003_GuidComune.Designer.cs
generated
Normal file
1166
StandManager.Infrastructure/Migrations/20251222160003_GuidComune.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace StandManager.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class GuidComune : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Comune",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ComuneId",
|
||||
table: "IscrizioneEvento",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IscrizioneEvento_ComuneId",
|
||||
table: "IscrizioneEvento",
|
||||
column: "ComuneId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IscrizioneEvento_ComuneIstat_ComuneId",
|
||||
table: "IscrizioneEvento",
|
||||
column: "ComuneId",
|
||||
principalTable: "ComuneIstat",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_IscrizioneEvento_ComuneIstat_ComuneId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_IscrizioneEvento_ComuneId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ComuneId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Comune",
|
||||
table: "IscrizioneEvento",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -398,8 +398,8 @@ namespace StandManager.Infrastructure.Migrations
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Comune")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
b.Property<Guid?>("ComuneId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("DataCreazione")
|
||||
.HasColumnType("datetime2");
|
||||
@ -471,6 +471,8 @@ namespace StandManager.Infrastructure.Migrations
|
||||
|
||||
b.HasIndex("ClienteId");
|
||||
|
||||
b.HasIndex("ComuneId");
|
||||
|
||||
b.HasIndex("DestinazioneId");
|
||||
|
||||
b.HasIndex("EventoId");
|
||||
@ -941,6 +943,10 @@ namespace StandManager.Infrastructure.Migrations
|
||||
.WithMany()
|
||||
.HasForeignKey("ClienteId");
|
||||
|
||||
b.HasOne("StandManager.Domain.Entita.ComuneIstat", "Comune")
|
||||
.WithMany()
|
||||
.HasForeignKey("ComuneId");
|
||||
|
||||
b.HasOne("StandManager.Domain.Entita.Destinazione", "Destinazione")
|
||||
.WithMany()
|
||||
.HasForeignKey("DestinazioneId");
|
||||
@ -971,6 +977,8 @@ namespace StandManager.Infrastructure.Migrations
|
||||
|
||||
b.Navigation("Cliente");
|
||||
|
||||
b.Navigation("Comune");
|
||||
|
||||
b.Navigation("Destinazione");
|
||||
|
||||
b.Navigation("Evento");
|
||||
|
||||
Reference in New Issue
Block a user