hrms-api-exam/Migrations/20230324115135_Update table Candidate add occupation nation of family2.cs
2023-03-25 01:09:03 +07:00

100 lines
3.5 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Recurit.Exam.Service.Migrations
{
/// <inheritdoc />
public partial class UpdatetableCandidateaddoccupationnationoffamily2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "MarryOccupation",
table: "Candidates",
type: "varchar(200)",
maxLength: 200,
nullable: true,
comment: "อาชีพคู่สมรส",
oldClrType: typeof(string),
oldType: "varchar(100)",
oldMaxLength: 100,
oldNullable: true,
oldComment: "อาชีพคู่สมรส")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "FatherNationality",
table: "Candidates",
type: "varchar(100)",
maxLength: 100,
nullable: true,
comment: "สัญชาติบิดา")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "FatherOccupation",
table: "Candidates",
type: "varchar(200)",
maxLength: 200,
nullable: true,
comment: "อาชีพบิดา")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "MotherNationality",
table: "Candidates",
type: "varchar(100)",
maxLength: 100,
nullable: true,
comment: "สัญชาติมารดา")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "MotherOccupation",
table: "Candidates",
type: "varchar(200)",
maxLength: 200,
nullable: true,
comment: "อาชีพมารดา")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "FatherNationality",
table: "Candidates");
migrationBuilder.DropColumn(
name: "FatherOccupation",
table: "Candidates");
migrationBuilder.DropColumn(
name: "MotherNationality",
table: "Candidates");
migrationBuilder.DropColumn(
name: "MotherOccupation",
table: "Candidates");
migrationBuilder.AlterColumn<string>(
name: "MarryOccupation",
table: "Candidates",
type: "varchar(100)",
maxLength: 100,
nullable: true,
comment: "อาชีพคู่สมรส",
oldClrType: typeof(string),
oldType: "varchar(200)",
oldMaxLength: 200,
oldNullable: true,
oldComment: "อาชีพคู่สมรส")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}