hrms-api-backend/BMA.EHR.Infrastructure/Migrations/LeaveDb/20260505035145_Change Field.cs
Suphonchai Phoonsawat 63d983f831
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m49s
fix issue #1572
2026-05-05 12:37:38 +07:00

62 lines
2.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class ChangeField : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "LeaveDaysUsed",
table: "LeaveBeginnings",
type: "double",
nullable: true,
comment: "จำนวนวันลาที่ใช้ไป",
oldClrType: typeof(double),
oldType: "double",
oldComment: "จำนวนวันลาที่ใช้ไป");
migrationBuilder.AlterColumn<int>(
name: "LeaveCount",
table: "LeaveBeginnings",
type: "int",
nullable: true,
comment: "จำนวนครั้งที่ลาสะสม",
oldClrType: typeof(int),
oldType: "int",
oldComment: "จำนวนครั้งที่ลาสะสม");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "LeaveDaysUsed",
table: "LeaveBeginnings",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "จำนวนวันลาที่ใช้ไป",
oldClrType: typeof(double),
oldType: "double",
oldNullable: true,
oldComment: "จำนวนวันลาที่ใช้ไป");
migrationBuilder.AlterColumn<int>(
name: "LeaveCount",
table: "LeaveBeginnings",
type: "int",
nullable: false,
defaultValue: 0,
comment: "จำนวนครั้งที่ลาสะสม",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true,
oldComment: "จำนวนครั้งที่ลาสะสม");
}
}
}