no message
This commit is contained in:
parent
3582a6d783
commit
d8bc0f1a50
3 changed files with 12798 additions and 0 deletions
12695
BMA.EHR.Infrastructure/Migrations/20230807061916_update table org add orgagency.Designer.cs
generated
Normal file
12695
BMA.EHR.Infrastructure/Migrations/20230807061916_update table org add orgagency.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,81 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class updatetableorgaddorgagency : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "OrganizationAgencyId",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "OrganizationGovernmentAgencyId",
|
||||||
|
table: "Organizations",
|
||||||
|
type: "char(36)",
|
||||||
|
nullable: true,
|
||||||
|
collation: "ascii_general_ci");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_OrganizationAgencyId",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "OrganizationAgencyId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Organizations_OrganizationGovernmentAgencyId",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "OrganizationGovernmentAgencyId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Organizations_OrganizationAgencys_OrganizationAgencyId",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "OrganizationAgencyId",
|
||||||
|
principalTable: "OrganizationAgencys",
|
||||||
|
principalColumn: "Id");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_Organizations_OrganizationGovernmentAgencys_OrganizationGove~",
|
||||||
|
table: "Organizations",
|
||||||
|
column: "OrganizationGovernmentAgencyId",
|
||||||
|
principalTable: "OrganizationGovernmentAgencys",
|
||||||
|
principalColumn: "Id");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Organizations_OrganizationAgencys_OrganizationAgencyId",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_Organizations_OrganizationGovernmentAgencys_OrganizationGove~",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Organizations_OrganizationAgencyId",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_Organizations_OrganizationGovernmentAgencyId",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "OrganizationAgencyId",
|
||||||
|
table: "Organizations");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "OrganizationGovernmentAgencyId",
|
||||||
|
table: "Organizations");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8655,9 +8655,15 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.HasColumnOrder(102)
|
.HasColumnOrder(102)
|
||||||
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
|
||||||
|
|
||||||
|
b.Property<Guid?>("OrganizationAgencyId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<Guid?>("OrganizationFaxId")
|
b.Property<Guid?>("OrganizationFaxId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("OrganizationGovernmentAgencyId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
b.Property<Guid?>("OrganizationLevelId")
|
b.Property<Guid?>("OrganizationLevelId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
|
@ -8699,8 +8705,12 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("OrganizationAgencyId");
|
||||||
|
|
||||||
b.HasIndex("OrganizationFaxId");
|
b.HasIndex("OrganizationFaxId");
|
||||||
|
|
||||||
|
b.HasIndex("OrganizationGovernmentAgencyId");
|
||||||
|
|
||||||
b.HasIndex("OrganizationLevelId");
|
b.HasIndex("OrganizationLevelId");
|
||||||
|
|
||||||
b.HasIndex("OrganizationOrganizationId");
|
b.HasIndex("OrganizationOrganizationId");
|
||||||
|
|
@ -11920,10 +11930,18 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
|
||||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b =>
|
modelBuilder.Entity("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", b =>
|
||||||
{
|
{
|
||||||
|
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationAgency", "OrganizationAgency")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("OrganizationAgencyId");
|
||||||
|
|
||||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax")
|
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationFax", "OrganizationFax")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("OrganizationFaxId");
|
.HasForeignKey("OrganizationFaxId");
|
||||||
|
|
||||||
|
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationGovernmentAgency", "OrganizationGovernmentAgency")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("OrganizationGovernmentAgencyId");
|
||||||
|
|
||||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel")
|
b.HasOne("BMA.EHR.Domain.Models.MetaData.OrganizationLevel", "OrganizationLevel")
|
||||||
.WithMany()
|
.WithMany()
|
||||||
.HasForeignKey("OrganizationLevelId");
|
.HasForeignKey("OrganizationLevelId");
|
||||||
|
|
@ -11956,8 +11974,12 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.WithMany("Organizations")
|
.WithMany("Organizations")
|
||||||
.HasForeignKey("ParentId");
|
.HasForeignKey("ParentId");
|
||||||
|
|
||||||
|
b.Navigation("OrganizationAgency");
|
||||||
|
|
||||||
b.Navigation("OrganizationFax");
|
b.Navigation("OrganizationFax");
|
||||||
|
|
||||||
|
b.Navigation("OrganizationGovernmentAgency");
|
||||||
|
|
||||||
b.Navigation("OrganizationLevel");
|
b.Navigation("OrganizationLevel");
|
||||||
|
|
||||||
b.Navigation("OrganizationOrganization");
|
b.Navigation("OrganizationOrganization");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue