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