using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetablePlacementProfilesaddorg : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "positionId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ตำแหน่ง", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "id ตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "child1", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "orgRevisionId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id revision") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "เลขที่ตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionField", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "สายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "positionName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อตำแหน่งในสายงาน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "child1", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child1Id", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child1ShortName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child2", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child2Id", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child2ShortName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child3", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child3Id", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child3ShortName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child4", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child4Id", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child4ShortName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "orgRevisionId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "posLevelId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "posLevelName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "posMasterNo", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "posTypeId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "posTypeName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "positionField", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "positionName", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "root", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "rootId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "rootShortName", table: "PlacementProfiles"); migrationBuilder.AlterColumn( name: "positionId", table: "PlacementProfiles", type: "char(36)", nullable: true, comment: "id ตำแหน่ง", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "id ตำแหน่ง") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }