using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
///
public partial class AddFieldCancelLeaveWrotetoLeaveRequest : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "ApproveStep",
table: "LeaveRequests",
type: "longtext",
nullable: true,
comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "CancelLeaveWrote",
table: "LeaveRequests",
type: "longtext",
nullable: true,
comment: "เขียนที่ (ขอยกเลิก)")
.Annotation("MySql:CharSet", "utf8mb4");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CancelLeaveWrote",
table: "LeaveRequests");
migrationBuilder.UpdateData(
table: "LeaveRequests",
keyColumn: "ApproveStep",
keyValue: null,
column: "ApproveStep",
value: "");
migrationBuilder.AlterColumn(
name: "ApproveStep",
table: "LeaveRequests",
type: "longtext",
nullable: false,
comment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "step การอนุมัติ st1 = จทน.อนุมัตื,st2 = ผู้บังคับบัญชา อนุมัติ ")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}