using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
///
public partial class updateTableretireaddyear : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn(
name: "Remove",
table: "RetirementProfiles",
type: "longtext",
nullable: false,
comment: "ลบออกจากเกษียญ",
oldClrType: typeof(bool),
oldType: "tinyint(1)",
oldComment: "ลบออกจากเกษียญ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn(
name: "Year",
table: "RetirementPeriods",
type: "int",
nullable: false,
defaultValue: 0,
comment: "ปีงบประมาณ");
// migrationBuilder.AddColumn(
// name: "RefCommandDate",
// table: "ProfileInsignias",
// type: "datetime(6)",
// nullable: true,
// comment: "เอกสารอ้างอิง (ลงวันที่)");
// migrationBuilder.AddColumn(
// name: "RefCommandNo",
// table: "ProfileInsignias",
// type: "longtext",
// nullable: true,
// comment: "เอกสารอ้างอิง (เลขที่คำสั่ง)")
// .Annotation("MySql:CharSet", "utf8mb4");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Year",
table: "RetirementPeriods");
// migrationBuilder.DropColumn(
// name: "RefCommandDate",
// table: "ProfileInsignias");
// migrationBuilder.DropColumn(
// name: "RefCommandNo",
// table: "ProfileInsignias");
migrationBuilder.AlterColumn(
name: "Remove",
table: "RetirementProfiles",
type: "tinyint(1)",
nullable: false,
comment: "ลบออกจากเกษียญ",
oldClrType: typeof(string),
oldType: "longtext",
oldComment: "ลบออกจากเกษียญ")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}