แก้ กก
This commit is contained in:
parent
c724246081
commit
a31447c278
5 changed files with 18536 additions and 53 deletions
18398
BMA.EHR.Infrastructure/Migrations/20241031045640_update table placement Add position.Designer.cs
generated
Normal file
18398
BMA.EHR.Infrastructure/Migrations/20241031045640_update table placement Add position.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class updatetableplacementAddposition : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionLevels_PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionTypes_PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_PlacementProfiles_PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionLevel",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ระดับ")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionType",
|
||||
table: "PlacementProfiles",
|
||||
type: "longtext",
|
||||
nullable: true,
|
||||
comment: "ประเภทตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevel",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionType",
|
||||
table: "PlacementProfiles");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
type: "char(36)",
|
||||
nullable: true,
|
||||
collation: "ascii_general_ci");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionLevelId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_PlacementProfiles_PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionTypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionLevels_PositionLevelId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionLevelId",
|
||||
principalTable: "PositionLevels",
|
||||
principalColumn: "Id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_PlacementProfiles_PositionTypes_PositionTypeId",
|
||||
table: "PlacementProfiles",
|
||||
column: "PositionTypeId",
|
||||
principalTable: "PositionTypes",
|
||||
principalColumn: "Id");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -12376,8 +12376,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
b.Property<Guid?>("PositionCandidateId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<Guid?>("PositionLevelId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("PositionLevel")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ระดับ");
|
||||
|
||||
b.Property<Guid?>("PositionLineId")
|
||||
.HasColumnType("char(36)");
|
||||
|
|
@ -12395,8 +12396,9 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.HasColumnType("double")
|
||||
.HasComment("เงินประจำตำแหน่ง");
|
||||
|
||||
b.Property<Guid?>("PositionTypeId")
|
||||
.HasColumnType("char(36)");
|
||||
b.Property<string>("PositionType")
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ประเภทตำแหน่ง");
|
||||
|
||||
b.Property<string>("Prefix")
|
||||
.HasColumnType("longtext")
|
||||
|
|
@ -12723,8 +12725,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("PositionCandidateId");
|
||||
|
||||
b.HasIndex("PositionLevelId");
|
||||
|
||||
b.HasIndex("PositionLineId");
|
||||
|
||||
b.HasIndex("PositionNumberId");
|
||||
|
|
@ -12733,8 +12733,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.HasIndex("PositionPathSideId");
|
||||
|
||||
b.HasIndex("PositionTypeId");
|
||||
|
||||
b.HasIndex("ProfileImgId");
|
||||
|
||||
b.HasIndex("ReliefDocId");
|
||||
|
|
@ -17724,10 +17722,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("PositionCandidateId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLevel", "PositionLevel")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionLevelId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionLine", "PositionLine")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionLineId");
|
||||
|
|
@ -17744,10 +17738,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
.WithMany()
|
||||
.HasForeignKey("PositionPathSideId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.MetaData.PositionType", "PositionType")
|
||||
.WithMany()
|
||||
.HasForeignKey("PositionTypeId");
|
||||
|
||||
b.HasOne("BMA.EHR.Domain.Models.Documents.Document", "ProfileImg")
|
||||
.WithMany()
|
||||
.HasForeignKey("ProfileImgId");
|
||||
|
|
@ -17762,8 +17752,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("PositionCandidate");
|
||||
|
||||
b.Navigation("PositionLevel");
|
||||
|
||||
b.Navigation("PositionLine");
|
||||
|
||||
b.Navigation("PositionNumber");
|
||||
|
|
@ -17772,8 +17760,6 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
b.Navigation("PositionPathSide");
|
||||
|
||||
b.Navigation("PositionType");
|
||||
|
||||
b.Navigation("ProfileImg");
|
||||
|
||||
b.Navigation("ReliefDoc");
|
||||
|
|
@ -18082,7 +18068,7 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResignCancel", b =>
|
||||
{
|
||||
b.HasOne("BMA.EHR.Domain.Models.Retirement.RetirementResign", "RetirementResign")
|
||||
.WithMany()
|
||||
.WithMany("RetirementResignCancels")
|
||||
.HasForeignKey("RetirementResignId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
|
@ -18397,6 +18383,8 @@ namespace BMA.EHR.Infrastructure.Migrations
|
|||
|
||||
modelBuilder.Entity("BMA.EHR.Domain.Models.Retirement.RetirementResign", b =>
|
||||
{
|
||||
b.Navigation("RetirementResignCancels");
|
||||
|
||||
b.Navigation("RetirementResignDebtDocs");
|
||||
|
||||
b.Navigation("RetirementResignDocs");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue