Prov/Citt

This commit is contained in:
2026-01-08 09:07:15 +01:00
parent 0b08a943a5
commit 941e24551c
20 changed files with 2699 additions and 28 deletions

View File

@ -0,0 +1,79 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class CittaEProv : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "ComuneIstatId",
table: "Destinazione",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "ProvinciaIstatId",
table: "Destinazione",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Destinazione_ComuneIstatId",
table: "Destinazione",
column: "ComuneIstatId");
migrationBuilder.CreateIndex(
name: "IX_Destinazione_ProvinciaIstatId",
table: "Destinazione",
column: "ProvinciaIstatId");
migrationBuilder.AddForeignKey(
name: "FK_Destinazione_ComuneIstat_ComuneIstatId",
table: "Destinazione",
column: "ComuneIstatId",
principalTable: "ComuneIstat",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Destinazione_Province_ProvinciaIstatId",
table: "Destinazione",
column: "ProvinciaIstatId",
principalTable: "Province",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Destinazione_ComuneIstat_ComuneIstatId",
table: "Destinazione");
migrationBuilder.DropForeignKey(
name: "FK_Destinazione_Province_ProvinciaIstatId",
table: "Destinazione");
migrationBuilder.DropIndex(
name: "IX_Destinazione_ComuneIstatId",
table: "Destinazione");
migrationBuilder.DropIndex(
name: "IX_Destinazione_ProvinciaIstatId",
table: "Destinazione");
migrationBuilder.DropColumn(
name: "ComuneIstatId",
table: "Destinazione");
migrationBuilder.DropColumn(
name: "ProvinciaIstatId",
table: "Destinazione");
}
}
}