ComuneIstat

This commit is contained in:
2025-12-19 10:38:51 +01:00
parent 39246b5d16
commit 1f87913904
15 changed files with 2379 additions and 36 deletions

View File

@ -0,0 +1,64 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace StandManager.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class ComuneIstat : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ComuneIstat",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Istat = table.Column<string>(type: "nvarchar(max)", nullable: false),
Comune = table.Column<string>(type: "nvarchar(max)", nullable: false),
Regione = table.Column<string>(type: "nvarchar(max)", nullable: false),
Provincia = table.Column<string>(type: "nvarchar(max)", nullable: false),
Prefisso = table.Column<string>(type: "nvarchar(max)", nullable: false),
CodFisco = table.Column<string>(type: "nvarchar(max)", nullable: false),
DataCreazione = table.Column<DateTime>(type: "datetime2", nullable: false),
DataModifica = table.Column<DateTime>(type: "datetime2", nullable: true),
Eliminato = table.Column<bool>(type: "bit", nullable: false),
IdUtenteCreazione = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IdUtenteModifica = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ComuneIstat", x => x.Id);
table.ForeignKey(
name: "FK_ComuneIstat_Utente_IdUtenteCreazione",
column: x => x.IdUtenteCreazione,
principalTable: "Utente",
principalColumn: "Id");
table.ForeignKey(
name: "FK_ComuneIstat_Utente_IdUtenteModifica",
column: x => x.IdUtenteModifica,
principalTable: "Utente",
principalColumn: "Id");
});
migrationBuilder.CreateIndex(
name: "IX_ComuneIstat_IdUtenteCreazione",
table: "ComuneIstat",
column: "IdUtenteCreazione");
migrationBuilder.CreateIndex(
name: "IX_ComuneIstat_IdUtenteModifica",
table: "ComuneIstat",
column: "IdUtenteModifica");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ComuneIstat");
}
}
}