using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class updatetableInsigniaRequestaddorg2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IsCancel", table: "RetirementResignEmployees", type: "tinyint(1)", nullable: false, defaultValue: false, comment: "สถานะยกเลิก"); migrationBuilder.AlterColumn( name: "Organization", table: "InsigniaRequests", type: "longtext", nullable: true, oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } /// 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( name: "Organization", table: "InsigniaRequests", type: "longtext", nullable: false, oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }