修改映射配置,字段
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c8b0681dfa
commit
19d9ca44fb
|
@ -74,7 +74,7 @@ public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
||||||
{
|
{
|
||||||
builder.HasKey(e => e.SeqId);
|
builder.HasKey(e => e.SeqId);
|
||||||
|
|
||||||
builder.HasOne(e => e.TaskStudy).WithMany().HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
builder.HasOne(e => e.TaskStudy).WithMany(t => t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,49 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class test2 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropForeignKey(
|
||||||
|
name: "FK_TaskInstance_TaskStudy_TaskStudySeqId",
|
||||||
|
table: "TaskInstance");
|
||||||
|
|
||||||
|
migrationBuilder.DropIndex(
|
||||||
|
name: "IX_TaskInstance_TaskStudySeqId",
|
||||||
|
table: "TaskInstance");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "TaskStudySeqId",
|
||||||
|
table: "TaskInstance");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<Guid>(
|
||||||
|
name: "TaskStudySeqId",
|
||||||
|
table: "TaskInstance",
|
||||||
|
type: "uniqueidentifier",
|
||||||
|
nullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_TaskInstance_TaskStudySeqId",
|
||||||
|
table: "TaskInstance",
|
||||||
|
column: "TaskStudySeqId");
|
||||||
|
|
||||||
|
migrationBuilder.AddForeignKey(
|
||||||
|
name: "FK_TaskInstance_TaskStudy_TaskStudySeqId",
|
||||||
|
table: "TaskInstance",
|
||||||
|
column: "TaskStudySeqId",
|
||||||
|
principalTable: "TaskStudy",
|
||||||
|
principalColumn: "SeqId");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9955,9 +9955,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid>("SubjectId")
|
b.Property<Guid>("SubjectId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
b.Property<Guid?>("TaskStudySeqId")
|
|
||||||
.HasColumnType("uniqueidentifier");
|
|
||||||
|
|
||||||
b.Property<Guid>("TrialId")
|
b.Property<Guid>("TrialId")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
@ -9988,8 +9985,6 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
|
||||||
b.HasIndex("StudyId");
|
b.HasIndex("StudyId");
|
||||||
|
|
||||||
b.HasIndex("TaskStudySeqId");
|
|
||||||
|
|
||||||
b.ToTable("TaskInstance", t =>
|
b.ToTable("TaskInstance", t =>
|
||||||
{
|
{
|
||||||
t.HasComment("项目阅片 - 任务后处理Instance");
|
t.HasComment("项目阅片 - 任务后处理Instance");
|
||||||
|
@ -17047,16 +17042,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy")
|
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", "TaskStudy")
|
||||||
.WithMany()
|
.WithMany("InstanceList")
|
||||||
.HasForeignKey("StudyId")
|
.HasForeignKey("StudyId")
|
||||||
.HasPrincipalKey("Id")
|
.HasPrincipalKey("Id")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("IRaCIS.Core.Domain.Models.TaskStudy", null)
|
|
||||||
.WithMany("InstanceList")
|
|
||||||
.HasForeignKey("TaskStudySeqId");
|
|
||||||
|
|
||||||
b.Navigation("CreateUser");
|
b.Navigation("CreateUser");
|
||||||
|
|
||||||
b.Navigation("TaskSeries");
|
b.Navigation("TaskSeries");
|
||||||
|
|
Loading…
Reference in New Issue