56 lines
2.6 KiB
C#
56 lines
2.6 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddLeaveRangeEnd : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "LeaveRange",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย",
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext",
|
|
oldNullable: true,
|
|
oldComment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LeaveRangeEnd",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "LeaveRangeEnd",
|
|
table: "LeaveRequests");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "LeaveRange",
|
|
table: "LeaveRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
comment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย",
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext",
|
|
oldNullable: true,
|
|
oldComment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|