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");
        }
    }
}
