using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class AddfieldForCommandType1820 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "GovAidCommandNo",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "คำสั่งเลขที่ (คำสั่งช่วยราชการ)",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<DateTime>(
                name: "GovAidCommandDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "ลงวันที่ (คำสั่งช่วยราชการ)",
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldNullable: true);

            migrationBuilder.AddColumn<DateTime>(
                name: "ConclusionFireDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                comment: "ลงวันที่ (เรื่องการดำเนินการทางวินัย)");

            migrationBuilder.AddColumn<string>(
                name: "ConclusionFireNo",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ครั้งที่ (เรื่องการดำเนินการทางวินัย)")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "ConclusionFireResolution",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "มติที่ประชุม (เรื่องการดำเนินการทางวินัย)")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Fault",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "รายละเอียดการกระทำผิด")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "GuiltyBasis",
                table: "Commands",
                type: "longtext",
                nullable: true,
                comment: "ฐานความผิด")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

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

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

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

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

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

            migrationBuilder.AlterColumn<string>(
                name: "GovAidCommandNo",
                table: "Commands",
                type: "longtext",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "คำสั่งเลขที่ (คำสั่งช่วยราชการ)")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<DateTime>(
                name: "GovAidCommandDate",
                table: "Commands",
                type: "datetime(6)",
                nullable: true,
                oldClrType: typeof(DateTime),
                oldType: "datetime(6)",
                oldNullable: true,
                oldComment: "ลงวันที่ (คำสั่งช่วยราชการ)");
        }
    }
}
