using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace StandManager.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class PartitaIvaGiorniPresenza : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "Note",
                table: "IscrizioneEvento",
                type: "nvarchar(max)",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "nvarchar(max)");

            migrationBuilder.AddColumn<DateTime>(
                name: "GiornoPresenzaAl",
                table: "IscrizioneEvento",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<DateTime>(
                name: "GiornoPresenzaDal",
                table: "IscrizioneEvento",
                type: "datetime2",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<string>(
                name: "PartitaIva",
                table: "IscrizioneEvento",
                type: "nvarchar(max)",
                nullable: true);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "GiornoPresenzaAl",
                table: "IscrizioneEvento");

            migrationBuilder.DropColumn(
                name: "GiornoPresenzaDal",
                table: "IscrizioneEvento");

            migrationBuilder.DropColumn(
                name: "PartitaIva",
                table: "IscrizioneEvento");

            migrationBuilder.AlterColumn<string>(
                name: "Note",
                table: "IscrizioneEvento",
                type: "nvarchar(max)",
                nullable: false,
                defaultValue: "",
                oldClrType: typeof(string),
                oldType: "nvarchar(max)",
                oldNullable: true);
        }
    }
}
