62 lines
2.6 KiB
C#
62 lines
2.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddFieldCancelLeaveWrotetoLeaveRequest : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
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<string>(
|
|
name: "CancelLeaveWrote",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "เขียนที่ (ขอยกเลิก)")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
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<string>(
|
|
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");
|
|
}
|
|
}
|
|
}
|