Migrate เก็บฟิลด์ใช้แสดงในรายงานลาเพิ่ม #2195
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m18s

This commit is contained in:
harid 2026-01-16 09:25:22 +07:00
parent 5ec7933b3c
commit 64c1021c52
7 changed files with 1708 additions and 0 deletions

View file

@ -0,0 +1,54 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class add_fields_table_eaveequestpprover : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "OrganizationName",
table: "LeaveRequestApprovers",
type: "longtext",
nullable: false,
comment: "สังกัด")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PosExecutiveName",
table: "LeaveRequestApprovers",
type: "longtext",
nullable: false,
comment: "ตำแหน่งทางการบริหาร")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "PositionLevelName",
table: "LeaveRequestApprovers",
type: "longtext",
nullable: false,
comment: "ประเภทระดับตำแหน่ง")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "OrganizationName",
table: "LeaveRequestApprovers");
migrationBuilder.DropColumn(
name: "PosExecutiveName",
table: "LeaveRequestApprovers");
migrationBuilder.DropColumn(
name: "PositionLevelName",
table: "LeaveRequestApprovers");
}
}
}

View file

@ -727,6 +727,21 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
b.Property<Guid>("LeaveRequestId")
.HasColumnType("char(36)");
b.Property<string>("OrganizationName")
.IsRequired()
.HasColumnType("longtext")
.HasComment("สังกัด");
b.Property<string>("PosExecutiveName")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ตำแหน่งทางการบริหาร");
b.Property<string>("PositionLevelName")
.IsRequired()
.HasColumnType("longtext")
.HasComment("ประเภทระดับตำแหน่ง");
b.Property<string>("PositionName")
.IsRequired()
.HasColumnType("longtext");