using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddfieldForCommandType1017 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "ChairManFullName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ประธานคณะกรรมการ")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<DateTime>(
                name: "ConclusionReceiveDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "ลงวันที่ (การรับโอน)");

            migrationBuilder.AddColumn<string>(
                name: "ConclusionReceiveNo",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "มติ กก. ครั้งที่ (การรับโอน)")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<DateTime>(
                name: "GovAidCommandDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "GovAidCommandNo",
                table: "Commands",
                type: "longtext",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Member1FullName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "กรรมการคนที่ 1")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Member2FullName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "กรรมการคนที่ 2")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<DateTime>(
                name: "PlacementCommandDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "คำสั่งบรรจุลงวันที่");

            migrationBuilder.AddColumn<string>(
                name: "PlacementCommandIssuer",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "หน่วยงานที่ออกคำสั่งบรรจุ")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PlacementCommandNo",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "เลขที่คำสั่งบรรจุ")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PlacementOrganizationName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "สังกัดที่บรรจุ")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "PlacementPositionName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ตำแหน่งที่บรรจุ")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<DateTime>(
                name: "ProbationEndDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "วันที่สิ้นสุดการทดลองปฏิบัติราชการ");

            migrationBuilder.AddColumn<DateTime>(
                name: "ProbationStartDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "วันที่เริ่มทดลองปฏิบัติราชการ");

            migrationBuilder.AddColumn<string>(
                name: "ReceiveOrganizationName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ส่วนราชการที่รับโอน")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "TransferOrganizationName",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ส่วนราชการที่ให้โอน")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

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

            migrationBuilder.DropColumn(
                name: "ConclusionReceiveDate",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "ConclusionReceiveNo",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "GovAidCommandDate",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "GovAidCommandNo",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "Member1FullName",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "Member2FullName",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "PlacementCommandDate",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "PlacementCommandIssuer",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "PlacementCommandNo",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "PlacementOrganizationName",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "PlacementPositionName",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "ProbationEndDate",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "ProbationStartDate",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "ReceiveOrganizationName",
                table: "Commands");

            migrationBuilder.DropColumn(
                name: "TransferOrganizationName",
                table: "Commands");
        }
    }
}
