using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updateTableplacementExamNumbernullable : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<int>(
                name: "ExamRound",
                table: "PlacementProfiles",
                type: "int",
                nullable: true,
                comment: "จำนวนครั้งที่สมัครสอบ",
                oldClrType: typeof(int),
                oldType: "int",
                oldComment: "จำนวนครั้งที่สมัครสอบ");

            migrationBuilder.AlterColumn<int>(
                name: "ExamNumber",
                table: "PlacementProfiles",
                type: "int",
                nullable: true,
                comment: "ลำดับที่สอบได้",
                oldClrType: typeof(int),
                oldType: "int",
                oldComment: "ลำดับที่สอบได้");

            migrationBuilder.AlterColumn<int>(
                name: "DurationYear",
                table: "PlacementEducations",
                type: "int",
                nullable: true,
                comment: "ระยะเวลาหลักสูตร",
                oldClrType: typeof(int),
                oldType: "int",
                oldComment: "ระยะเวลาหลักสูตร");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<int>(
                name: "ExamRound",
                table: "PlacementProfiles",
                type: "int",
                nullable: false,
                defaultValue: 0,
                comment: "จำนวนครั้งที่สมัครสอบ",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "จำนวนครั้งที่สมัครสอบ");

            migrationBuilder.AlterColumn<int>(
                name: "ExamNumber",
                table: "PlacementProfiles",
                type: "int",
                nullable: false,
                defaultValue: 0,
                comment: "ลำดับที่สอบได้",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "ลำดับที่สอบได้");

            migrationBuilder.AlterColumn<int>(
                name: "DurationYear",
                table: "PlacementEducations",
                type: "int",
                nullable: false,
                defaultValue: 0,
                comment: "ระยะเวลาหลักสูตร",
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true,
                oldComment: "ระยะเวลาหลักสูตร");
        }
    }
}
