63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
public partial class AddBeginningLeaveandLeaveCounttoLeaveBeginning : Migration
|
|||
|
|
{
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.AlterColumn<double>(
|
|||
|
|
name: "LeaveDays",
|
|||
|
|
table: "LeaveBeginnings",
|
|||
|
|
type: "double",
|
|||
|
|
nullable: false,
|
|||
|
|
comment: "จำนวนวันลาทั้งหมด",
|
|||
|
|
oldClrType: typeof(double),
|
|||
|
|
oldType: "double",
|
|||
|
|
oldComment: "จำนวนวันลายกมา");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddColumn<int>(
|
|||
|
|
name: "BeginningLeaveCount",
|
|||
|
|
table: "LeaveBeginnings",
|
|||
|
|
type: "int",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: 0,
|
|||
|
|
comment: "จำนวนครั้งที่ลายกมา");
|
|||
|
|
|
|||
|
|
migrationBuilder.AddColumn<double>(
|
|||
|
|
name: "BeginningLeaveDays",
|
|||
|
|
table: "LeaveBeginnings",
|
|||
|
|
type: "double",
|
|||
|
|
nullable: false,
|
|||
|
|
defaultValue: 0.0,
|
|||
|
|
comment: "จำนวนวันลายกมา");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <inheritdoc />
|
|||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropColumn(
|
|||
|
|
name: "BeginningLeaveCount",
|
|||
|
|
table: "LeaveBeginnings");
|
|||
|
|
|
|||
|
|
migrationBuilder.DropColumn(
|
|||
|
|
name: "BeginningLeaveDays",
|
|||
|
|
table: "LeaveBeginnings");
|
|||
|
|
|
|||
|
|
migrationBuilder.AlterColumn<double>(
|
|||
|
|
name: "LeaveDays",
|
|||
|
|
table: "LeaveBeginnings",
|
|||
|
|
type: "double",
|
|||
|
|
nullable: false,
|
|||
|
|
comment: "จำนวนวันลายกมา",
|
|||
|
|
oldClrType: typeof(double),
|
|||
|
|
oldType: "double",
|
|||
|
|
oldComment: "จำนวนวันลาทั้งหมด");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|