using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Recruit.Migrations { /// public partial class AddFieldtoRecruitImportTableforSupportCMS : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "Year", table: "RecruitImports", type: "int", nullable: false, comment: "ปีงบประมาณที่จัดสอบ", oldClrType: typeof(int), oldType: "int", oldComment: "ปีที่จัดการสอบ"); migrationBuilder.AlterColumn( name: "Name", table: "RecruitImports", type: "varchar(250)", maxLength: 250, nullable: false, comment: "รอบการสอบ", oldClrType: typeof(string), oldType: "varchar(250)", oldMaxLength: 250, oldComment: "ชื่อการสอบ") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "AnnouncementEndDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันสิ้นสุดประกาศ") .Annotation("Relational:ColumnOrder", 7); migrationBuilder.AddColumn( name: "AnnouncementStartDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันเริ่มประกาศ") .Annotation("Relational:ColumnOrder", 6); migrationBuilder.AddColumn( name: "Detail", table: "RecruitImports", type: "text", nullable: true, comment: "รายละเอียด") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "ExamDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันที่สอบ") .Annotation("Relational:ColumnOrder", 12); migrationBuilder.AddColumn( name: "Fee", table: "RecruitImports", type: "int", nullable: false, defaultValue: 0, comment: "ค่าธรรมเนียม") .Annotation("Relational:ColumnOrder", 5); migrationBuilder.AddColumn( name: "Note", table: "RecruitImports", type: "text", nullable: true, comment: "หมายเหตุ") .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "PaymentEndDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันสิ้นสุดชำระเงิน") .Annotation("Relational:ColumnOrder", 9); migrationBuilder.AddColumn( name: "PaymentStartDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันเริ่มชำระเงิน") .Annotation("Relational:ColumnOrder", 8); migrationBuilder.AddColumn( name: "RegisterEndDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันสิ้นสุดสมัครสอบ") .Annotation("Relational:ColumnOrder", 11); migrationBuilder.AddColumn( name: "RegisterStartDate", table: "RecruitImports", type: "datetime(6)", nullable: true, comment: "วันเริ่มสมัครสอบ") .Annotation("Relational:ColumnOrder", 10); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "AnnouncementEndDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "AnnouncementStartDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "Detail", table: "RecruitImports"); migrationBuilder.DropColumn( name: "ExamDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "Fee", table: "RecruitImports"); migrationBuilder.DropColumn( name: "Note", table: "RecruitImports"); migrationBuilder.DropColumn( name: "PaymentEndDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "PaymentStartDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "RegisterEndDate", table: "RecruitImports"); migrationBuilder.DropColumn( name: "RegisterStartDate", table: "RecruitImports"); migrationBuilder.AlterColumn( name: "Year", table: "RecruitImports", type: "int", nullable: false, comment: "ปีที่จัดการสอบ", oldClrType: typeof(int), oldType: "int", oldComment: "ปีงบประมาณที่จัดสอบ"); migrationBuilder.AlterColumn( name: "Name", table: "RecruitImports", type: "varchar(250)", maxLength: 250, nullable: false, comment: "ชื่อการสอบ", oldClrType: typeof(string), oldType: "varchar(250)", oldMaxLength: 250, oldComment: "รอบการสอบ") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }