78 lines
2.6 KiB
C#
78 lines
2.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddFieldtoLeaveRequestDearPosoition : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "Dear",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "เรียนใคร")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LeaveTypeCode",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "code ของประเภทการลา")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "OrganizationName",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "สังกัดผู้ยื่นขอ")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PositionLevelName",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ระดับผู้ยื่นขอ")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "PositionName",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ตำแหน่งผู้ยื่นขอ")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Dear",
|
|
table: "LeaveRequests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LeaveTypeCode",
|
|
table: "LeaveRequests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "OrganizationName",
|
|
table: "LeaveRequests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionLevelName",
|
|
table: "LeaveRequests");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionName",
|
|
table: "LeaveRequests");
|
|
}
|
|
}
|
|
}
|