hrms-api-exam/Migrations/20231003152125_Update Table Careers add type1.cs

114 lines
3.9 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Recurit.Exam.Service.Migrations
{
/// <inheritdoc />
public partial class UpdateTableCareersaddtype1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Pile",
table: "Careers",
type: "longtext",
nullable: true,
comment: "กอง",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "กอง")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "Org",
table: "Careers",
type: "longtext",
nullable: true,
comment: "สังกัด",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "สังกัด")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AlterColumn<string>(
name: "Group",
table: "Careers",
type: "longtext",
nullable: true,
comment: "กลุ่ม/ฝ่าย",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "กลุ่ม/ฝ่าย")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.UpdateData(
table: "Careers",
keyColumn: "Pile",
keyValue: null,
column: "Pile",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Pile",
table: "Careers",
type: "longtext",
nullable: false,
comment: "กอง",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "กอง")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "Careers",
keyColumn: "Org",
keyValue: null,
column: "Org",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Org",
table: "Careers",
type: "longtext",
nullable: false,
comment: "สังกัด",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "สังกัด")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "Careers",
keyColumn: "Group",
keyValue: null,
column: "Group",
value: "");
migrationBuilder.AlterColumn<string>(
name: "Group",
table: "Careers",
type: "longtext",
nullable: false,
comment: "กลุ่ม/ฝ่าย",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "กลุ่ม/ฝ่าย")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}