using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class update_table_retirementOther_add_position : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "PositionExecutive", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ตำแหน่งทางการบริหาร") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "ReportingDate", table: "RetirementOthers", type: "datetime(6)", nullable: true, comment: "วันที่รายงานตัว"); migrationBuilder.AddColumn( name: "child1", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "node", table: "RetirementOthers", type: "int", nullable: true, comment: "ระดับโครงสร้าง"); migrationBuilder.AddColumn( name: "nodeId", table: "RetirementOthers", type: "char(36)", nullable: true, comment: "id โครงสร้าง", collation: "ascii_general_ci"); migrationBuilder.AddColumn( name: "orgRevisionId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id revision") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "RetirementOthers", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "position", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อตำแหน่งในสายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionField", table: "RetirementOthers", type: "longtext", nullable: true, comment: "สายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id ตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posmasterId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id อัตรากำลัง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "RetirementOthers", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "PositionExecutive", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "ReportingDate", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child1", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child1DnaId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child1Id", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child1ShortName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child2", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child2DnaId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child2Id", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child2ShortName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child3", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child3DnaId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child3Id", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child3ShortName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child4", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child4DnaId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child4Id", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child4ShortName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "node", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "nodeId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "orgRevisionId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posLevelId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posLevelName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posMasterNo", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posTypeId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posTypeName", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "position", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "positionField", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "positionId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "posmasterId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "root", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "rootDnaId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "rootId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "rootShortName", table: "RetirementOthers"); } } }