using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations.DisciplineDb { /// public partial class updatetableDisciplineDisciplinarysaddIsSuspend3 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~", table: "DisciplineReport_Profiles"); migrationBuilder.DropIndex( name: "IX_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "DisciplineDisciplinary_ProfileComplaintInvestigateId", table: "DisciplineReport_Profiles"); migrationBuilder.AddColumn( name: "DisciplinaryCaseFault", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "กรณีความผิด") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "DisciplinaryFaultLevel", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ระดับโทษความผิด กรณีไม่ร้ายแรง: ภาคทัณฑ์, ตัดเงินเดือน, ลดขั้นเงินเดือน | กรณีร้ายแรง: ปลดออก, ไล่ออก") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "OffenseDetails", table: "DisciplineReport_Profiles", type: "longtext", nullable: true, comment: "ลักษณะความผิดครั้งแรกจะเป็น 'ยังไม่ระบุ' (NOT_SPECIFIED คือ ยังไม่ระบุ, NOT_DEADLY คือ ไม่ร้ายแรง, DEADLY คือ ร้ายแรง)") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "Title", table: "DisciplineReport_Profiles", type: "text", nullable: true, comment: "เรื่องที่ร้องเรียน") .Annotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "DisciplinaryCaseFault", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "DisciplinaryFaultLevel", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "OffenseDetails", table: "DisciplineReport_Profiles"); migrationBuilder.DropColumn( name: "Title", table: "DisciplineReport_Profiles"); migrationBuilder.AddColumn( name: "DisciplineDisciplinary_ProfileComplaintInvestigateId", table: "DisciplineReport_Profiles", type: "char(36)", nullable: false, defaultValue: new Guid("00000000-0000-0000-0000-000000000000"), collation: "ascii_general_ci"); migrationBuilder.CreateIndex( name: "IX_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~", table: "DisciplineReport_Profiles", column: "DisciplineDisciplinary_ProfileComplaintInvestigateId"); migrationBuilder.AddForeignKey( name: "FK_DisciplineReport_Profiles_DisciplineDisciplinary_ProfileComp~", table: "DisciplineReport_Profiles", column: "DisciplineDisciplinary_ProfileComplaintInvestigateId", principalTable: "DisciplineDisciplinary_ProfileComplaintInvestigates", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } } }