using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetableplacementProfileadddnaroot : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "child1DnaOldId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "RetirementOthers", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaOldId", table: "PlacementTransfers", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "PlacementTransfers", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "PlacementTransfers", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "PlacementTransfers", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "PlacementTransfers", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaOldId", table: "PlacementRepatriations", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "PlacementRepatriations", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "PlacementRepatriations", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "PlacementRepatriations", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "PlacementRepatriations", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "PlacementReceives", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "PlacementReceives", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "PlacementReceives", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "PlacementReceives", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "PlacementReceives", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "PlacementProfiles", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaOldId", table: "PlacementOfficers", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaOldId", table: "PlacementOfficers", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaOldId", table: "PlacementOfficers", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaOldId", table: "PlacementOfficers", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaOldId", table: "PlacementOfficers", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna old") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "PlacementAppointments", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "PlacementAppointments", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "PlacementAppointments", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "PlacementAppointments", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "PlacementAppointments", type: "longtext", nullable: true, comment: "id หน่วยงาน rootDna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1DnaId", table: "PlacementAppointmentEmployee", type: "longtext", nullable: true, comment: "id หน่วยงาน child1Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2DnaId", table: "PlacementAppointmentEmployee", type: "longtext", nullable: true, comment: "id หน่วยงาน child2Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3DnaId", table: "PlacementAppointmentEmployee", type: "longtext", nullable: true, comment: "id หน่วยงาน child3Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4DnaId", table: "PlacementAppointmentEmployee", type: "longtext", nullable: true, comment: "id หน่วยงาน child4Dna") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootDnaId", table: "PlacementAppointmentEmployee", type: "longtext", nullable: true, comment: "id DNA ใช้ในกรณีที่มีการทำสำเนาโครงสร้าง โครงสร้างใหม่ที่ทำสำเนากับโครงสร้างเก่าจะต้องมี DNA เดียวกัน เพื่อให้ track ประวัติการแก้ไขโครงสร้างย้อนหลังได้") .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "child1DnaOldId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "RetirementOthers"); migrationBuilder.DropColumn( name: "child1DnaOldId", table: "PlacementTransfers"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "PlacementTransfers"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "PlacementTransfers"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "PlacementTransfers"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "PlacementTransfers"); migrationBuilder.DropColumn( name: "child1DnaOldId", table: "PlacementRepatriations"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "PlacementRepatriations"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "PlacementRepatriations"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "PlacementRepatriations"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "PlacementRepatriations"); migrationBuilder.DropColumn( name: "child1DnaId", table: "PlacementReceives"); migrationBuilder.DropColumn( name: "child2DnaId", table: "PlacementReceives"); migrationBuilder.DropColumn( name: "child3DnaId", table: "PlacementReceives"); migrationBuilder.DropColumn( name: "child4DnaId", table: "PlacementReceives"); migrationBuilder.DropColumn( name: "rootDnaId", table: "PlacementReceives"); migrationBuilder.DropColumn( name: "child1DnaId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child2DnaId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child3DnaId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child4DnaId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "rootDnaId", table: "PlacementProfiles"); migrationBuilder.DropColumn( name: "child1DnaOldId", table: "PlacementOfficers"); migrationBuilder.DropColumn( name: "child2DnaOldId", table: "PlacementOfficers"); migrationBuilder.DropColumn( name: "child3DnaOldId", table: "PlacementOfficers"); migrationBuilder.DropColumn( name: "child4DnaOldId", table: "PlacementOfficers"); migrationBuilder.DropColumn( name: "rootDnaOldId", table: "PlacementOfficers"); migrationBuilder.DropColumn( name: "child1DnaId", table: "PlacementAppointments"); migrationBuilder.DropColumn( name: "child2DnaId", table: "PlacementAppointments"); migrationBuilder.DropColumn( name: "child3DnaId", table: "PlacementAppointments"); migrationBuilder.DropColumn( name: "child4DnaId", table: "PlacementAppointments"); migrationBuilder.DropColumn( name: "rootDnaId", table: "PlacementAppointments"); migrationBuilder.DropColumn( name: "child1DnaId", table: "PlacementAppointmentEmployee"); migrationBuilder.DropColumn( name: "child2DnaId", table: "PlacementAppointmentEmployee"); migrationBuilder.DropColumn( name: "child3DnaId", table: "PlacementAppointmentEmployee"); migrationBuilder.DropColumn( name: "child4DnaId", table: "PlacementAppointmentEmployee"); migrationBuilder.DropColumn( name: "rootDnaId", table: "PlacementAppointmentEmployee"); } } }