migrate + ปรับสอบแข่งขัน (#6)
Co-authored-by: harid <harid_pr61@live.rmutl.com>
This commit is contained in:
parent
9332086ee9
commit
6e9fb4b368
7 changed files with 1839 additions and 110 deletions
1601
Migrations/20251016094447_update_nullable.Designer.cs
generated
Normal file
1601
Migrations/20251016094447_update_nullable.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
109
Migrations/20251016094447_update_nullable.cs
Normal file
109
Migrations/20251016094447_update_nullable.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue