hrms-api-exam/Migrations/20230424125726_update table candidate add pointB C.cs

126 lines
4.2 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Recurit.Exam.Service.Migrations
{
/// <inheritdoc />
public partial class updatetablecandidateaddpointBC : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Point",
table: "Candidates");
migrationBuilder.AlterColumn<string>(
name: "Pass",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "ผลสมัครสอบ",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldNullable: true,
oldComment: "ผลสมัครสอบ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PointB",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "คะแนนภาค ข")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PointC",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "คะแนนภาค ค")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PointTotalB",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "คะแนนเต็มภาค ข")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PointTotalC",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "คะแนนเต็มภาค ค")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "ResultB",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "ผลสอบภาค ข")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "ResultC",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "ผลสอบภาค ค")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "PointB",
table: "Candidates");
migrationBuilder.DropColumn(
name: "PointC",
table: "Candidates");
migrationBuilder.DropColumn(
name: "PointTotalB",
table: "Candidates");
migrationBuilder.DropColumn(
name: "PointTotalC",
table: "Candidates");
migrationBuilder.DropColumn(
name: "ResultB",
table: "Candidates");
migrationBuilder.DropColumn(
name: "ResultC",
table: "Candidates");
migrationBuilder.AlterColumn<bool>(
name: "Pass",
table: "Candidates",
type: "tinyint(1)",
nullable: true,
comment: "ผลสมัครสอบ",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "ผลสมัครสอบ")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "Point",
table: "Candidates",
type: "longtext",
nullable: true,
comment: "คะแนน")
.Annotation("MySql:CharSet", "utf8mb4");
}
}
}