using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetableplacementaddoldroot : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "AmountOld", table: "PlacementProfiles", type: "double", nullable: true, comment: "เงินเดือน"); migrationBuilder.AddColumn( name: "IsOld", table: "PlacementProfiles", type: "tinyint(1)", nullable: true, comment: "ข้อมูลเก่า"); migrationBuilder.AddColumn( name: "child1IdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Old", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2IdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Old", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3IdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Old", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4IdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Old", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "nodeIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id โครงสร้าง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "nodeOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ระดับโครงสร้าง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "orgRevisionIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id revision") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNoOld", table: "PlacementProfiles", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionFieldOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "สายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อตำแหน่งในสายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posmasterIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id อัตรากำลัง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootIdOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortNameOld", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); } /// 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"); } } }