using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb { /// public partial class updatetabledisciplineaddroot : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id อ้างอิง profile", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "id อ้างอิง profile") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "child1", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "DisciplineReport_Profiles", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeId", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineInvestigates", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "กรณีหน่วยงานใส่ id ของหน่วยงาน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineInvestigates", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", oldClrType: typeof(Guid), oldType: "char(36)", oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "ConsideredAgencyId", table: "DisciplineInvestigates", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "OrganizationId", table: "DisciplineInvestigates", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id อ้างอิง profile", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "id อ้างอิง profile") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "child1", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "DisciplineInvestigate_ProfileComplaints", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeId", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "DisciplineInvestigate_ProfileComplaints", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineDisciplinarys", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "กรณีหน่วยงานใส่ id ของหน่วยงาน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineDisciplinarys", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", oldClrType: typeof(Guid), oldType: "char(36)", oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "ConsideredAgencyId", table: "DisciplineDisciplinarys", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "OrganizationId", table: "DisciplineDisciplinarys", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id อ้างอิง profile", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "id อ้างอิง profile") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "child1", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineComplaints", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "กรณีหน่วยงานใส่ id ของหน่วยงาน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineComplaints", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", oldClrType: typeof(Guid), oldType: "char(36)", oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "ConsideredAgencyId", table: "DisciplineComplaints", type: "longtext", nullable: true, comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "OrganizationId", table: "DisciplineComplaints", type: "longtext", nullable: true, comment: "กรณีหน่วยงานใส่หน่วยงาน id") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id อ้างอิง profile", oldClrType: typeof(Guid), oldType: "char(36)", oldNullable: true, oldComment: "id อ้างอิง profile") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); migrationBuilder.AddColumn( name: "child1", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1Id", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child1ShortName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child1") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2Id", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child2ShortName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child2") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3Id", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child3ShortName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child3") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4Id", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "child4ShortName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน child4") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelId", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id ระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posLevelName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อระดับตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posMasterNo", table: "DisciplineComplaint_Profiles", type: "int", nullable: true, comment: "เลขที่ตำแหน่ง"); migrationBuilder.AddColumn( name: "posTypeId", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id ประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "posTypeName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อประเภทตำแหน่ง") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "root", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootId", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "id หน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "rootShortName", table: "DisciplineComplaint_Profiles", type: "longtext", nullable: true, comment: "ชื่อย่อหน่วยงาน root") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ProfileId", table: "DisciplineComplaint_Appeals", type: "longtext", nullable: false, comment: "ProfileId", oldClrType: typeof(Guid), oldType: "char(36)", oldComment: "ProfileId") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("Relational:Collation", "ascii_general_ci"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "child1", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child1Id", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child1ShortName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child2", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child2Id", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child2ShortName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child3", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child3Id", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child3ShortName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child4", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child4Id", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "child4ShortName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "posLevelId", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "posLevelName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "posMasterNo", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "posTypeId", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "posTypeName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "root", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "rootId", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "rootShortName", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "ConsideredAgencyId", table: "DisciplineInvestigates"); migrationBuilder.DropColumn( name: "OrganizationId", table: "DisciplineInvestigates"); migrationBuilder.DropColumn( name: "child1", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child1Id", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child1ShortName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child2", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child2Id", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child2ShortName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child3", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child3Id", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child3ShortName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child4", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child4Id", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "child4ShortName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "posLevelId", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "posLevelName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "posMasterNo", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "posTypeId", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "posTypeName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "root", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "rootId", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "rootShortName", table: "DisciplineInvestigate_ProfileComplaints"); migrationBuilder.DropColumn( name: "ConsideredAgencyId", table: "DisciplineDisciplinarys"); migrationBuilder.DropColumn( name: "OrganizationId", table: "DisciplineDisciplinarys"); migrationBuilder.DropColumn( name: "child1", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child1Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child1ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child2", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child2Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child2ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child3", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child3Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child3ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child4", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child4Id", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "child4ShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "posLevelId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "posLevelName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "posMasterNo", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "posTypeId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "posTypeName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "root", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "rootId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "rootShortName", table: "DisciplineDisciplinary_ProfileComplaintInvestigates"); migrationBuilder.DropColumn( name: "ConsideredAgencyId", table: "DisciplineComplaints"); migrationBuilder.DropColumn( name: "OrganizationId", table: "DisciplineComplaints"); migrationBuilder.DropColumn( name: "child1", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child1Id", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child1ShortName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child2", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child2Id", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child2ShortName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child3", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child3Id", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child3ShortName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child4", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child4Id", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "child4ShortName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "posLevelId", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "posLevelName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "posMasterNo", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "posTypeId", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "posTypeName", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "root", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "rootId", table: "DisciplineComplaint_Profiles"); migrationBuilder.DropColumn( name: "rootShortName", table: "DisciplineComplaint_Profiles"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineReport_Profiles", type: "char(36)", nullable: true, comment: "id อ้างอิง profile", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "id อ้างอิง profile") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineInvestigates", type: "char(36)", nullable: true, comment: "กรณีหน่วยงานใส่ id ของหน่วยงาน", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "กรณีหน่วยงานใส่หน่วยงาน") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineInvestigates", type: "char(36)", nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineInvestigate_ProfileComplaints", type: "char(36)", nullable: true, comment: "id อ้างอิง profile", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "id อ้างอิง profile") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineDisciplinarys", type: "char(36)", nullable: true, comment: "กรณีหน่วยงานใส่ id ของหน่วยงาน", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "กรณีหน่วยงานใส่หน่วยงาน") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineDisciplinarys", type: "char(36)", nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineDisciplinary_ProfileComplaintInvestigates", type: "char(36)", nullable: true, comment: "id อ้างอิง profile", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "id อ้างอิง profile") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Organization", table: "DisciplineComplaints", type: "char(36)", nullable: true, comment: "กรณีหน่วยงานใส่ id ของหน่วยงาน", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "กรณีหน่วยงานใส่หน่วยงาน") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ConsideredAgency", table: "DisciplineComplaints", type: "char(36)", nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), comment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "หน่วยงานที่พิจารณา จะเปลี่ยนไปตามผู้ถูกร้องดูรายละเอียดด้านล่าง") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "PersonId", table: "DisciplineComplaint_Profiles", type: "char(36)", nullable: true, comment: "id อ้างอิง profile", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "id อ้างอิง profile") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ProfileId", table: "DisciplineComplaint_Appeals", type: "char(36)", nullable: false, comment: "ProfileId", collation: "ascii_general_ci", oldClrType: typeof(string), oldType: "longtext", oldComment: "ProfileId") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }