ProvSuIscrizione
This commit is contained in:
@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace StandManager.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ModificaProvSuIscrizione : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Provincia",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ProvinciaId",
|
||||
table: "IscrizioneEvento",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||
table: "IscrizioneEvento",
|
||||
column: "ProvinciaId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||
table: "IscrizioneEvento",
|
||||
column: "ProvinciaId",
|
||||
principalTable: "Provincie",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_IscrizioneEvento_Provincie_ProvinciaId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_IscrizioneEvento_ProvinciaId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProvinciaId",
|
||||
table: "IscrizioneEvento");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Provincia",
|
||||
table: "IscrizioneEvento",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user