hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230720054911_add field to Command Table.cs
2023-07-20 14:53:09 +07:00

55 lines
1.7 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class addfieldtoCommandTable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "CommandAffectDate",
table: "Commands",
type: "datetime(6)",
nullable: true,
comment: "วันที่คำสั่งมีผล");
migrationBuilder.AddColumn<DateTime>(
name: "CommandExcecuteDate",
table: "Commands",
type: "datetime(6)",
nullable: true,
comment: "วันที่ออกคำสั่ง");
migrationBuilder.AddColumn<string>(
name: "CommandSubject",
table: "Commands",
type: "varchar(500)",
maxLength: 500,
nullable: false,
defaultValue: "",
comment: "คำสั่งเรื่อง")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CommandAffectDate",
table: "Commands");
migrationBuilder.DropColumn(
name: "CommandExcecuteDate",
table: "Commands");
migrationBuilder.DropColumn(
name: "CommandSubject",
table: "Commands");
}
}
}