using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Recurit.Exam.Service.Migrations { /// public partial class UpdateTableCareersaddtype1 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Pile", table: "Careers", type: "longtext", nullable: true, comment: "กอง", oldClrType: typeof(string), oldType: "longtext", oldComment: "กอง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Org", table: "Careers", type: "longtext", nullable: true, comment: "สังกัด", oldClrType: typeof(string), oldType: "longtext", oldComment: "สังกัด") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AlterColumn( name: "Group", table: "Careers", 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: "Careers", keyColumn: "Pile", keyValue: null, column: "Pile", value: ""); migrationBuilder.AlterColumn( name: "Pile", table: "Careers", type: "longtext", nullable: false, comment: "กอง", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "กอง") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "Careers", keyColumn: "Org", keyValue: null, column: "Org", value: ""); migrationBuilder.AlterColumn( name: "Org", table: "Careers", type: "longtext", nullable: false, comment: "สังกัด", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "สังกัด") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.UpdateData( table: "Careers", keyColumn: "Group", keyValue: null, column: "Group", value: ""); migrationBuilder.AlterColumn( name: "Group", table: "Careers", type: "longtext", nullable: false, comment: "กลุ่ม/ฝ่าย", oldClrType: typeof(string), oldType: "longtext", oldNullable: true, oldComment: "กลุ่ม/ฝ่าย") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }