using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Recruit.Service.Migrations { /// public partial class add_fields_RecruitScore : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "SumC", table: "RecruitScores", type: "double", nullable: false, comment: "ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนรวม", oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "SumB", table: "RecruitScores", type: "double", nullable: true, oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "SumAB", table: "RecruitScores", type: "double", nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม", oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "SumA", table: "RecruitScores", type: "double", nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม", oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "PercentageC", table: "RecruitScores", type: "double", nullable: false, comment: "ภาคความเหมาะสมกับตำแหน่ง ร้อยละ", oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "PercentageB", table: "RecruitScores", type: "double", nullable: true, oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "PercentageA", table: "RecruitScores", type: "double", nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ร้อยละ", oldClrType: typeof(double), oldType: "double"); migrationBuilder.AlterColumn( name: "FullC", table: "RecruitScores", type: "int", nullable: false, comment: "ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนเต็ม", oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "FullB", table: "RecruitScores", type: "int", nullable: true, oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "FullA", table: "RecruitScores", type: "int", nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนเต็ม", oldClrType: typeof(int), oldType: "int"); migrationBuilder.AlterColumn( name: "ExamStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, comment: "สอบได้ / ตก / ขาดสอบ", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ExamId", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, comment: "เลขประจำตัวสอบ", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "CStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, comment: "ภาคความเหมาะสมกับตำแหน่ง ผลประเมิน", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "AStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ABStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, comment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน", oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "CitizenId", table: "RecruitScores", type: "varchar(13)", maxLength: 13, nullable: false, defaultValue: "", comment: "เลขประจำตัวประชาชน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "FullD", table: "RecruitScores", type: "int", nullable: false, defaultValue: 0, comment: "ภาคความเหมาะสมกับตำแหน่ง สัมภาษณ์ คะแนนเต็ม"); migrationBuilder.AddColumn( name: "FullScore", table: "RecruitScores", type: "int", nullable: false, defaultValue: 0, comment: "คะแนนเต็ม"); migrationBuilder.AddColumn( name: "RemarkExamOrder", table: "RecruitScores", type: "longtext", nullable: false, comment: "หมายเหตุจากลำดับที่สอบได้") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "RemarkScore", table: "RecruitScores", type: "longtext", nullable: false, comment: "หมายเหตุจากบัญชีรวมคะแนน") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "SumCD", table: "RecruitScores", type: "double", nullable: false, defaultValue: 0.0, comment: "ภาคความเหมาะสมกับตำแหน่ง คะแนนรวมทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ และสัมภาษณ์"); migrationBuilder.AddColumn( name: "SumD", table: "RecruitScores", type: "double", nullable: false, defaultValue: 0.0, comment: "ภาคความเหมาะสมกับตำแหน่ง สัมภาษณ์ คะแนนรวม"); migrationBuilder.AddColumn( name: "TotalScore", table: "RecruitScores", type: "double", nullable: false, defaultValue: 0.0, comment: "คะแนนรวม"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "CitizenId", table: "RecruitScores"); migrationBuilder.DropColumn( name: "FullD", table: "RecruitScores"); migrationBuilder.DropColumn( name: "FullScore", table: "RecruitScores"); migrationBuilder.DropColumn( name: "RemarkExamOrder", table: "RecruitScores"); migrationBuilder.DropColumn( name: "RemarkScore", table: "RecruitScores"); migrationBuilder.DropColumn( name: "SumCD", table: "RecruitScores"); migrationBuilder.DropColumn( name: "SumD", table: "RecruitScores"); migrationBuilder.DropColumn( name: "TotalScore", table: "RecruitScores"); migrationBuilder.AlterColumn( name: "SumC", table: "RecruitScores", type: "double", nullable: false, oldClrType: typeof(double), oldType: "double", oldComment: "ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนรวม"); migrationBuilder.AlterColumn( name: "SumB", table: "RecruitScores", type: "double", nullable: false, defaultValue: 0.0, oldClrType: typeof(double), oldType: "double", oldNullable: true); migrationBuilder.AlterColumn( name: "SumAB", table: "RecruitScores", type: "double", nullable: false, oldClrType: typeof(double), oldType: "double", oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม"); migrationBuilder.AlterColumn( name: "SumA", table: "RecruitScores", type: "double", nullable: false, oldClrType: typeof(double), oldType: "double", oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนรวม"); migrationBuilder.AlterColumn( name: "PercentageC", table: "RecruitScores", type: "double", nullable: false, oldClrType: typeof(double), oldType: "double", oldComment: "ภาคความเหมาะสมกับตำแหน่ง ร้อยละ"); migrationBuilder.AlterColumn( name: "PercentageB", table: "RecruitScores", type: "double", nullable: false, defaultValue: 0.0, oldClrType: typeof(double), oldType: "double", oldNullable: true); migrationBuilder.AlterColumn( name: "PercentageA", table: "RecruitScores", type: "double", nullable: false, oldClrType: typeof(double), oldType: "double", oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ร้อยละ"); migrationBuilder.AlterColumn( name: "FullC", table: "RecruitScores", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int", oldComment: "ภาคความเหมาะสมกับตำแหน่ง ทดสอบสมรรถนะ+ทดสอบจิตวิทยาฯ คะแนนเต็ม"); migrationBuilder.AlterColumn( name: "FullB", table: "RecruitScores", type: "int", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "int", oldNullable: true); migrationBuilder.AlterColumn( name: "FullA", table: "RecruitScores", type: "int", nullable: false, oldClrType: typeof(int), oldType: "int", oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง คะแนนเต็ม"); migrationBuilder.AlterColumn( name: "ExamStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "สอบได้ / ตก / ขาดสอบ") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ExamId", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "เลขประจำตัวสอบ") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "CStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "ภาคความเหมาะสมกับตำแหน่ง ผลประเมิน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "AStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "ABStatus", table: "RecruitScores", type: "varchar(50)", maxLength: 50, nullable: false, oldClrType: typeof(string), oldType: "varchar(50)", oldMaxLength: 50, oldComment: "ภาคความรู้ความสามารถที่ใช้เฉพาะตำแหน่ง ผลประเมิน") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }