using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Infrastructure.Migrations { /// public partial class update_table_placementRepatriation_add_refId1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "PositionName", table: "RetirementDeceasedNotis", type: "longtext", nullable: true, comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "OrganizationName", table: "RetirementDeceasedNotis", type: "longtext", nullable: true, comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.UpdateData( table: "RetirementDeceasedNotis", keyColumn: "PositionName", keyValue: null, column: "PositionName", value: ""); migrationBuilder.AlterColumn( name: "PositionName", table: "RetirementDeceasedNotis", type: "longtext", nullable: false, comment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "ชื่อตำแหน่งของผู้รับสำเนาคำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "RetirementDeceasedNotis", keyColumn: "OrganizationName", keyValue: null, column: "OrganizationName", value: ""); migrationBuilder.AlterColumn( name: "OrganizationName", table: "RetirementDeceasedNotis", type: "longtext", nullable: false, comment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "ชื่อหน่วยงานของผู้รับสำเนาคำสั่ง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }