change LeaveTotal to Double

This commit is contained in:
Suphonchai Phoonsawat 2023-12-21 14:30:10 +07:00
parent d7be2da281
commit 7ce1b11244
8 changed files with 1085 additions and 24 deletions

View file

@ -0,0 +1,66 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class ChangeLeaveTotaltoDouble : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "RestDayOldTotal",
table: "LeaveRequests",
type: "double",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<double>(
name: "RestDayCurrentTotal",
table: "LeaveRequests",
type: "double",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
migrationBuilder.AlterColumn<double>(
name: "LeaveTotal",
table: "LeaveRequests",
type: "double",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "RestDayOldTotal",
table: "LeaveRequests",
type: "int",
nullable: false,
oldClrType: typeof(double),
oldType: "double");
migrationBuilder.AlterColumn<int>(
name: "RestDayCurrentTotal",
table: "LeaveRequests",
type: "int",
nullable: false,
oldClrType: typeof(double),
oldType: "double");
migrationBuilder.AlterColumn<int>(
name: "LeaveTotal",
table: "LeaveRequests",
type: "int",
nullable: false,
oldClrType: typeof(double),
oldType: "double");
}
}
}