using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetableInsigniaNotesaddname : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_InsigniaNotes_Documents_ReliefDocId", table: "InsigniaNotes"); migrationBuilder.DropIndex( name: "IX_InsigniaNotes_ReliefDocId", table: "InsigniaNotes"); migrationBuilder.DropColumn( name: "Amount", table: "InsigniaNotes"); migrationBuilder.DropColumn( name: "EndDate", table: "InsigniaNotes"); migrationBuilder.DropColumn( name: "ReliefDocId", table: "InsigniaNotes"); migrationBuilder.DropColumn( name: "Round", table: "InsigniaNotes"); migrationBuilder.DropColumn( name: "StartDate", table: "InsigniaNotes"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Amount", table: "InsigniaNotes", type: "int", maxLength: 50, nullable: false, defaultValue: 0); migrationBuilder.AddColumn( name: "EndDate", table: "InsigniaNotes", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.AddColumn( name: "ReliefDocId", table: "InsigniaNotes", type: "char(36)", nullable: true, collation: "ascii_general_ci"); migrationBuilder.AddColumn( name: "Round", table: "InsigniaNotes", type: "int", nullable: false, defaultValue: 0, comment: "ราบการยื่นขอ"); migrationBuilder.AddColumn( name: "StartDate", table: "InsigniaNotes", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); migrationBuilder.CreateIndex( name: "IX_InsigniaNotes_ReliefDocId", table: "InsigniaNotes", column: "ReliefDocId"); migrationBuilder.AddForeignKey( name: "FK_InsigniaNotes_Documents_ReliefDocId", table: "InsigniaNotes", column: "ReliefDocId", principalTable: "Documents", principalColumn: "Id"); } } }