58 lines
1.9 KiB
C#
58 lines
1.9 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class updatetableInsigniaRequestaddorg2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsCancel",
|
|
table: "RetirementResignEmployees",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false,
|
|
comment: "สถานะยกเลิก");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Organization",
|
|
table: "InsigniaRequests",
|
|
type: "longtext",
|
|
nullable: true,
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext")
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "IsCancel",
|
|
table: "RetirementResignEmployees");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "InsigniaRequests",
|
|
keyColumn: "Organization",
|
|
keyValue: null,
|
|
column: "Organization",
|
|
value: "");
|
|
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "Organization",
|
|
table: "InsigniaRequests",
|
|
type: "longtext",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "longtext",
|
|
oldNullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4")
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|