migrate + ปรับสอบแข่งขัน (#6)

Co-authored-by: harid <harid_pr61@live.rmutl.com>
This commit is contained in:
Harid Promsri 2025-10-16 17:35:59 +07:00 committed by GitHub
parent 9332086ee9
commit 6e9fb4b368
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1839 additions and 110 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,109 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Recruit.Service.Migrations
{
/// <inheritdoc />
public partial class update_nullable : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "ModifiedDate",
table: "Recruits",
type: "datetime(6)",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<DateTime>(
name: "DateOfBirth",
table: "Recruits",
type: "datetime(6)",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<DateTime>(
name: "CitizenCardExpireDate",
table: "Recruits",
type: "datetime(6)",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<DateTime>(
name: "ApplyDate",
table: "Recruits",
type: "datetime(6)",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
migrationBuilder.AlterColumn<DateTime>(
name: "BachelorDate",
table: "RecruitEducations",
type: "datetime(6)",
nullable: true,
oldClrType: typeof(DateTime),
oldType: "datetime(6)");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<DateTime>(
name: "ModifiedDate",
table: "Recruits",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "DateOfBirth",
table: "Recruits",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "CitizenCardExpireDate",
table: "Recruits",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "ApplyDate",
table: "Recruits",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldNullable: true);
migrationBuilder.AlterColumn<DateTime>(
name: "BachelorDate",
table: "RecruitEducations",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified),
oldClrType: typeof(DateTime),
oldType: "datetime(6)",
oldNullable: true);
}
}
}

View file

@ -62,10 +62,10 @@ namespace BMA.EHR.Recruit.Service.Migrations
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("ApplyDate")
b.Property<DateTime?>("ApplyDate")
.HasColumnType("datetime(6)");
b.Property<DateTime>("CitizenCardExpireDate")
b.Property<DateTime?>("CitizenCardExpireDate")
.HasColumnType("datetime(6)");
b.Property<string>("CitizenCardIssuer")
@ -101,7 +101,7 @@ namespace BMA.EHR.Recruit.Service.Migrations
.HasColumnOrder(101)
.HasComment("User Id ที่สร้างข้อมูล");
b.Property<DateTime>("DateOfBirth")
b.Property<DateTime?>("DateOfBirth")
.HasColumnType("datetime(6)");
b.Property<string>("ExamId")
@ -157,7 +157,7 @@ namespace BMA.EHR.Recruit.Service.Migrations
.HasMaxLength(20)
.HasColumnType("varchar(20)");
b.Property<DateTime>("ModifiedDate")
b.Property<DateTime?>("ModifiedDate")
.HasColumnType("datetime(6)");
b.Property<string>("National")
@ -512,7 +512,7 @@ namespace BMA.EHR.Recruit.Service.Migrations
.HasComment("PrimaryKey")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<DateTime>("BachelorDate")
b.Property<DateTime?>("BachelorDate")
.HasColumnType("datetime(6)");
b.Property<DateTime>("CreatedAt")