ปรับ เครื่องราชย์ + ลา ลงเวลา ไปใช้ทะเบียนประวัติใหม่
This commit is contained in:
parent
1134267acf
commit
ab129896ae
20 changed files with 21443 additions and 3616 deletions
17900
BMA.EHR.Infrastructure/Migrations/20240624175204_Change insignia profile Link to GUID.Designer.cs
generated
Normal file
17900
BMA.EHR.Infrastructure/Migrations/20240624175204_Change insignia profile Link to GUID.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangeinsigniaprofileLinktoGUID : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Profiles_ProfileId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaRequestProfiles_Profiles_ProfileId",
|
||||
table: "InsigniaRequestProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InsigniaRequests_Organizations_OrganizationId",
|
||||
table: "InsigniaRequests");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProfileInsignias_Profiles_ProfileId",
|
||||
table: "ProfileInsignias");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaRequests_OrganizationId",
|
||||
table: "InsigniaRequests");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaRequestProfiles_ProfileId",
|
||||
table: "InsigniaRequestProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InsigniaNoteProfiles_ProfileId",
|
||||
table: "InsigniaNoteProfiles");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "ProfileInsignias",
|
||||
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.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
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_ProfileInsignias_Profiles_ProfileId",
|
||||
table: "ProfileInsignias",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ProfileInsignias_Profiles_ProfileId",
|
||||
table: "ProfileInsignias");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "ProfileInsignias",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci",
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "char(36)")
|
||||
.OldAnnotation("Relational:Collation", "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "ProfileId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
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.CreateIndex(
|
||||
name: "IX_InsigniaRequests_OrganizationId",
|
||||
table: "InsigniaRequests",
|
||||
column: "OrganizationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaRequestProfiles_ProfileId",
|
||||
table: "InsigniaRequestProfiles",
|
||||
column: "ProfileId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InsigniaNoteProfiles_ProfileId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "ProfileId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaNoteProfiles_Profiles_ProfileId",
|
||||
table: "InsigniaNoteProfiles",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaRequestProfiles_Profiles_ProfileId",
|
||||
table: "InsigniaRequestProfiles",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InsigniaRequests_Organizations_OrganizationId",
|
||||
table: "InsigniaRequests",
|
||||
column: "OrganizationId",
|
||||
principalTable: "Organizations",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ProfileInsignias_Profiles_ProfileId",
|
||||
table: "ProfileInsignias",
|
||||
column: "ProfileId",
|
||||
principalTable: "Profiles",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3983,7 +3983,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("varchar(30)")
|
||||
.HasComment("หน้า");
|
||||
|
||||
b.Property<Guid?>("ProfileId")
|
||||
b.Property<Guid>("ProfileId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("ReceiveDate")
|
||||
|
|
@ -6094,7 +6094,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("longtext")
|
||||
.HasComment("หน้าที่");
|
||||
|
||||
b.Property<Guid>("ProfileId")
|
||||
b.Property<Guid?>("ProfileId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<DateTime?>("RequestDate")
|
||||
|
|
@ -6135,8 +6135,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("OrgReturnInsigniaId");
|
||||
|
||||
b.HasIndex("ProfileId");
|
||||
|
||||
b.HasIndex("RequestInsigniaId");
|
||||
|
||||
b.ToTable("InsigniaNoteProfiles");
|
||||
|
|
@ -6307,8 +6305,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("DocumentId");
|
||||
|
||||
b.HasIndex("OrganizationId");
|
||||
|
||||
b.HasIndex("PeriodId");
|
||||
|
||||
b.ToTable("InsigniaRequests");
|
||||
|
|
@ -6410,8 +6406,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProfileId");
|
||||
|
||||
b.HasIndex("RequestId");
|
||||
|
||||
b.HasIndex("RequestInsigniaId");
|
||||
|
|
@ -16442,13 +16436,13 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("InsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", null)
|
||||
.WithMany("Insignias")
|
||||
.HasForeignKey("ProfileId");
|
||||
.HasForeignKey("ProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Insignia");
|
||||
|
||||
b.Navigation("Profile");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.HR.ProfileInsigniaHistory", b =>
|
||||
|
|
@ -16713,12 +16707,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("OrgReturnInsigniaId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia")
|
||||
.WithMany()
|
||||
.HasForeignKey("RequestInsigniaId")
|
||||
|
|
@ -16735,8 +16723,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("OrgReturnInsignia");
|
||||
|
||||
b.Navigation("Profile");
|
||||
|
||||
b.Navigation("RequestInsignia");
|
||||
});
|
||||
|
||||
|
|
@ -16755,12 +16741,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("DocumentId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "Organization")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrganizationId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaPeriod", "Period")
|
||||
.WithMany("InsigniaRequests")
|
||||
.HasForeignKey("PeriodId")
|
||||
|
|
@ -16769,19 +16749,11 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("Document");
|
||||
|
||||
b.Navigation("Organization");
|
||||
|
||||
b.Navigation("Period");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Insignias.InsigniaRequestProfile", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.HR.Profile", "Profile")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProfileId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Insignias.InsigniaRequest", "Request")
|
||||
.WithMany("RequestProfiles")
|
||||
.HasForeignKey("RequestId")
|
||||
|
|
@ -16794,8 +16766,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Profile");
|
||||
|
||||
b.Navigation("Request");
|
||||
|
||||
b.Navigation("RequestInsignia");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ using BMA.EHR.Domain.Models.Commands.Core;
|
|||
using BMA.EHR.Domain.Models.Documents;
|
||||
using BMA.EHR.Domain.Models.HR;
|
||||
using BMA.EHR.Domain.Models.Insignias;
|
||||
using BMA.EHR.Domain.Models.Leave;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Notifications;
|
||||
using BMA.EHR.Domain.Models.OrganizationEmployee;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue