This commit is contained in:
parent
8a3baab88f
commit
87e8c17309
9 changed files with 19456 additions and 68 deletions
19299
BMA.EHR.Infrastructure/Migrations/20250125161403_update table InsigniaPeriod add InsigniaEmployee1.Designer.cs
generated
Normal file
19299
BMA.EHR.Infrastructure/Migrations/20250125161403_update table InsigniaPeriod add InsigniaEmployee1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,88 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableInsigniaPeriodaddInsigniaEmployee1 : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaEmployees_InsigniaPeriods_InsigniaPeriodId",
|
||||
table: "InsigniaEmployees");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RefId",
|
||||
table: "InsigniaEmployees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "id ตำแหน่งลูกจ้าง",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "InsigniaPeriodId",
|
||||
table: "InsigniaEmployees",
|
||||
type: "char(36)",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)",
|
||||
oldNullable: true)
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaEmployees_InsigniaPeriods_InsigniaPeriodId",
|
||||
table: "InsigniaEmployees",
|
||||
column: "InsigniaPeriodId",
|
||||
principalTable: "InsigniaPeriods",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaEmployees_InsigniaPeriods_InsigniaPeriodId",
|
||||
table: "InsigniaEmployees");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "RefId",
|
||||
table: "InsigniaEmployees",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "longtext",
|
||||
oldNullable: true,
|
||||
oldComment: "id ตำแหน่งลูกจ้าง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "InsigniaPeriodId",
|
||||
table: "InsigniaEmployees",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaEmployees_InsigniaPeriods_InsigniaPeriodId",
|
||||
table: "InsigniaEmployees",
|
||||
column: "InsigniaPeriodId",
|
||||
principalTable: "InsigniaPeriods",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5676,7 +5676,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnOrder(101)
|
||||
.HasComment("User Id ที่สร้างข้อมูล");
|
||||
|
||||
b.Property<Guid?>("InsigniaPeriodId")
|
||||
b.Property<Guid>("InsigniaPeriodId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("LastUpdateFullName")
|
||||
|
|
@ -5699,7 +5699,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||
|
||||
b.Property<string>("RefId")
|
||||
.HasColumnType("longtext");
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("id ตำแหน่งลูกจ้าง");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
|
|
@ -18005,9 +18006,13 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaEmployee", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", null)
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "InsigniaPeriod")
|
||||
.WithMany("InsigniaEmployees")
|
||||
.HasForeignKey("InsigniaPeriodId");
|
||||
.HasForeignKey("InsigniaPeriodId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("InsigniaPeriod");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaManage", b =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue