65 lines
2.8 KiB
C#
65 lines
2.8 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|