91 lines
2.9 KiB
C#
91 lines
2.9 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class SPMConfig : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_DicomInstance_DicomStudy_StudyId",
|
|
table: "DicomInstance");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "CollectImagesEnum",
|
|
table: "Trial",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "阅片任务产生之前 采集影像");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsSPMJoinReReadingApproval",
|
|
table: "Trial",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: true,
|
|
comment: "SPM 参与重阅审批");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsSPMJoinReviewerSelect",
|
|
table: "Trial",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: true,
|
|
comment: "SPM 参与阅片人筛选");
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "IsSPMJoinSiteSurvey",
|
|
table: "Trial",
|
|
type: "bit",
|
|
nullable: false,
|
|
defaultValue: true,
|
|
comment: "SPM 参与中心调研");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_DicomInstance_DicomStudy_StudyId",
|
|
table: "DicomInstance",
|
|
column: "StudyId",
|
|
principalTable: "DicomStudy",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_DicomInstance_DicomStudy_StudyId",
|
|
table: "DicomInstance");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CollectImagesEnum",
|
|
table: "Trial");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsSPMJoinReReadingApproval",
|
|
table: "Trial");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsSPMJoinReviewerSelect",
|
|
table: "Trial");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "IsSPMJoinSiteSurvey",
|
|
table: "Trial");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_DicomInstance_DicomStudy_StudyId",
|
|
table: "DicomInstance",
|
|
column: "StudyId",
|
|
principalTable: "DicomStudy",
|
|
principalColumn: "SeqId",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|