no message

This commit is contained in:
kittapath 2024-11-21 12:16:52 +07:00
parent 519ef2f143
commit f3e8330241
5 changed files with 19376 additions and 41 deletions

View file

@ -0,0 +1,131 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableinsigniaaddOrgReceiveInsigniaId : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_InsigniaNoteProfiles_Organizations_OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropForeignKey(
name: "FK_InsigniaNoteProfiles_Organizations_OrgReturnInsigniaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropIndex(
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles");
migrationBuilder.DropIndex(
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
table: "InsigniaNoteProfiles");
migrationBuilder.AlterColumn<Guid>(
name: "OrgReturnInsigniaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
comment: "หน่วยงานคืนเครื่องราชฯ",
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true)
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AlterColumn<Guid>(
name: "OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
comment: "หน่วยงานรับเครื่องราชฯ",
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true)
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddColumn<string>(
name: "OrgReceiveInsignia",
table: "InsigniaNoteProfiles",
type: "longtext",
nullable: true,
comment: "หน่วยงานรับเครื่องราชฯ")
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "OrgReturnInsignia",
table: "InsigniaNoteProfiles",
type: "longtext",
nullable: true,
comment: "หน่วยงานคืนเครื่องราชฯ")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "OrgReceiveInsignia",
table: "InsigniaNoteProfiles");
migrationBuilder.DropColumn(
name: "OrgReturnInsignia",
table: "InsigniaNoteProfiles");
migrationBuilder.AlterColumn<Guid>(
name: "OrgReturnInsigniaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true,
oldComment: "หน่วยงานคืนเครื่องราชฯ")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AlterColumn<Guid>(
name: "OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true,
oldComment: "หน่วยงานรับเครื่องราชฯ")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.CreateIndex(
name: "IX_InsigniaNoteProfiles_OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles",
column: "OrgReceiveInsigniaId");
migrationBuilder.CreateIndex(
name: "IX_InsigniaNoteProfiles_OrgReturnInsigniaId",
table: "InsigniaNoteProfiles",
column: "OrgReturnInsigniaId");
migrationBuilder.AddForeignKey(
name: "FK_InsigniaNoteProfiles_Organizations_OrgReceiveInsigniaId",
table: "InsigniaNoteProfiles",
column: "OrgReceiveInsigniaId",
principalTable: "Organizations",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_InsigniaNoteProfiles_Organizations_OrgReturnInsigniaId",
table: "InsigniaNoteProfiles",
column: "OrgReturnInsigniaId",
principalTable: "Organizations",
principalColumn: "Id");
}
}
}

View file

@ -6115,11 +6115,21 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext")
.HasComment("หมายเลขประกาศนียบัตรกำกับเครื่องราชฯ");
b.Property<string>("OrgReceiveInsignia")
.HasColumnType("longtext")
.HasComment("หน่วยงานรับเครื่องราชฯ");
b.Property<Guid?>("OrgReceiveInsigniaId")
.HasColumnType("char(36)");
.HasColumnType("char(36)")
.HasComment("หน่วยงานรับเครื่องราชฯ");
b.Property<string>("OrgReturnInsignia")
.HasColumnType("longtext")
.HasComment("หน่วยงานคืนเครื่องราชฯ");
b.Property<Guid?>("OrgReturnInsigniaId")
.HasColumnType("char(36)");
.HasColumnType("char(36)")
.HasComment("หน่วยงานคืนเครื่องราชฯ");
b.Property<string>("OrganizationOrganizationReceive")
.HasColumnType("longtext")
@ -6197,10 +6207,6 @@ namespace BMA.EHR.Infrastructure.Migrations
b.HasIndex("InsigniaNoteId");
b.HasIndex("OrgReceiveInsigniaId");
b.HasIndex("OrgReturnInsigniaId");
b.HasIndex("RequestInsigniaId");
b.ToTable("InsigniaNoteProfiles");
@ -17918,14 +17924,6 @@ namespace BMA.EHR.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReceiveInsignia")
.WithMany()
.HasForeignKey("OrgReceiveInsigniaId");
b.HasOne("BMA.EHR.Domain.Models.Organizations.OrganizationEntity", "OrgReturnInsignia")
.WithMany()
.HasForeignKey("OrgReturnInsigniaId");
b.HasOne("BMA.EHR.Domain.Models.MetaData.Insignia", "RequestInsignia")
.WithMany()
.HasForeignKey("RequestInsigniaId")
@ -17938,10 +17936,6 @@ namespace BMA.EHR.Infrastructure.Migrations
b.Navigation("InsigniaNote");
b.Navigation("OrgReceiveInsignia");
b.Navigation("OrgReturnInsignia");
b.Navigation("RequestInsignia");
});