using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updatetableInsigniaNotesaddnumber : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DocumentStatus",
                table: "InsigniaRequestProfiles");

            migrationBuilder.DropColumn(
                name: "Note",
                table: "InsigniaRequestProfiles");

            migrationBuilder.DropColumn(
                name: "QualificationStatus",
                table: "InsigniaRequestProfiles");

            migrationBuilder.DropColumn(
                name: "Special",
                table: "InsigniaRequestProfiles");

            migrationBuilder.AlterColumn<string>(
                name: "MatchingConditions",
                table: "InsigniaRequestProfiles",
                type: "text",
                nullable: true,
                comment: "รายละเอียดเครื่องราชฯที่ขอ",
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true)
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Issue",
                table: "InsigniaNoteProfiles",
                type: "longtext",
                nullable: true,
                comment: "ทะเบียนฐานันดร",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Number",
                table: "InsigniaNoteProfiles",
                type: "longtext",
                nullable: true,
                comment: "หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

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

            migrationBuilder.AlterColumn<string>(
                name: "MatchingConditions",
                table: "InsigniaRequestProfiles",
                type: "text",
                nullable: true,
                oldClrType: typeof(string),
                oldType: "text",
                oldNullable: true,
                oldComment: "รายละเอียดเครื่องราชฯที่ขอ")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "DocumentStatus",
                table: "InsigniaRequestProfiles",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Note",
                table: "InsigniaRequestProfiles",
                type: "text",
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "QualificationStatus",
                table: "InsigniaRequestProfiles",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Special",
                table: "InsigniaRequestProfiles",
                type: "varchar(50)",
                maxLength: 50,
                nullable: true)
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AlterColumn<string>(
                name: "Issue",
                table: "InsigniaNoteProfiles",
                type: "longtext",
                nullable: true,
                comment: "หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ",
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true,
                oldComment: "ทะเบียนฐานันดร")
                .Annotation("MySql:CharSet", "utf8mb4")
                .OldAnnotation("MySql:CharSet", "utf8mb4");
        }
    }
}
