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