using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace BMA.EHR.Recurit.Exam.Service.Migrations { /// public partial class updatetableperiodexamdatecannull : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RegisterStartDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันเริ่มสมัครสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันเริ่มสมัครสอบ"); migrationBuilder.AlterColumn( name: "RegisterEndDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันสิ้นสุดสมัครสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันสิ้นสุดสมัครสอบ"); migrationBuilder.AlterColumn( name: "PaymentStartDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันเริ่มชำระเงิน", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันเริ่มชำระเงิน"); migrationBuilder.AlterColumn( name: "PaymentEndDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันสิ้นสุดชำระเงิน", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันสิ้นสุดชำระเงิน"); migrationBuilder.AlterColumn( name: "ExamDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันที่สอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันที่สอบ"); migrationBuilder.AlterColumn( name: "AnnouncementDate", table: "PeriodExams", type: "datetime(6)", nullable: true, comment: "วันประกาศผลสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldComment: "วันประกาศผลสอบ"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "RegisterStartDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันเริ่มสมัครสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันเริ่มสมัครสอบ"); migrationBuilder.AlterColumn( name: "RegisterEndDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันสิ้นสุดสมัครสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันสิ้นสุดสมัครสอบ"); migrationBuilder.AlterColumn( name: "PaymentStartDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันเริ่มชำระเงิน", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันเริ่มชำระเงิน"); migrationBuilder.AlterColumn( name: "PaymentEndDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันสิ้นสุดชำระเงิน", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันสิ้นสุดชำระเงิน"); migrationBuilder.AlterColumn( name: "ExamDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันที่สอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันที่สอบ"); migrationBuilder.AlterColumn( name: "AnnouncementDate", table: "PeriodExams", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), comment: "วันประกาศผลสอบ", oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true, oldComment: "วันประกาศผลสอบ"); } } }