using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updatetableplacementaddoldroot : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<double>(
                name: "AmountOld",
                table: "PlacementProfiles",
                type: "double",
                nullable: true,
                comment: "เงินเดือน");

            migrationBuilder.AddColumn<bool>(
                name: "IsOld",
                table: "PlacementProfiles",
                type: "tinyint(1)",
                nullable: true,
                comment: "ข้อมูลเก่า");

            migrationBuilder.AddColumn<string>(
                name: "child1IdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id หน่วยงาน child1")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child1Old",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อหน่วยงาน child1")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child1ShortNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อย่อหน่วยงาน child1")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child2IdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id หน่วยงาน child2")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child2Old",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อหน่วยงาน child2")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child2ShortNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อย่อหน่วยงาน child2")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child3IdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id หน่วยงาน child3")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child3Old",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อหน่วยงาน child3")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child3ShortNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อย่อหน่วยงาน child3")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child4IdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id หน่วยงาน child4")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child4Old",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อหน่วยงาน child4")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "child4ShortNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อย่อหน่วยงาน child4")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "nodeIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id โครงสร้าง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "nodeOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ระดับโครงสร้าง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "orgRevisionIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id revision")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "posLevelIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id ระดับตำแหน่ง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "posLevelNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อระดับตำแหน่ง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<int>(
                name: "posMasterNoOld",
                table: "PlacementProfiles",
                type: "int",
                nullable: true,
                comment: "เลขที่ตำแหน่ง");

            migrationBuilder.AddColumn<string>(
                name: "posTypeIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id ประเภทตำแหน่ง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "posTypeNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อประเภทตำแหน่ง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "positionFieldOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "สายงาน")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "positionIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id ตำแหน่ง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "positionNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อตำแหน่งในสายงาน")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "posmasterIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id อัตรากำลัง")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "rootIdOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "id หน่วยงาน root")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "rootOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อหน่วยงาน root")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "rootShortNameOld",
                table: "PlacementProfiles",
                type: "longtext",
                nullable: true,
                comment: "ชื่อย่อหน่วยงาน root")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

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

            migrationBuilder.DropColumn(
                name: "IsOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child1IdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child1Old",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child1ShortNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child2IdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child2Old",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child2ShortNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child3IdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child3Old",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child3ShortNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child4IdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child4Old",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "child4ShortNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "nodeIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "nodeOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "orgRevisionIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posLevelIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posLevelNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posMasterNoOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posTypeIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posTypeNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "positionFieldOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "positionIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "positionNameOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "posmasterIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "rootIdOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "rootOld",
                table: "PlacementProfiles");

            migrationBuilder.DropColumn(
                name: "rootShortNameOld",
                table: "PlacementProfiles");
        }
    }
}
