71 lines
2.3 KiB
C#
71 lines
2.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class addRandomOrder : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "RandomOrder",
|
|
table: "VisitTask",
|
|
type: "int",
|
|
nullable: true,
|
|
comment: "完全随机阅片号");
|
|
|
|
//migrationBuilder.CreateIndex(
|
|
// name: "IX_NoneDicomStudy_TrialId",
|
|
// table: "NoneDicomStudy",
|
|
// column: "TrialId");
|
|
|
|
//migrationBuilder.CreateIndex(
|
|
// name: "IX_ClinicalForm_ReadingId",
|
|
// table: "ClinicalForm",
|
|
// column: "ReadingId");
|
|
|
|
//migrationBuilder.AddForeignKey(
|
|
// name: "FK_ClinicalForm_SubjectVisit_ReadingId",
|
|
// table: "ClinicalForm",
|
|
// column: "ReadingId",
|
|
// principalTable: "SubjectVisit",
|
|
// principalColumn: "Id");
|
|
|
|
//migrationBuilder.AddForeignKey(
|
|
// name: "FK_NoneDicomStudy_Trial_TrialId",
|
|
// table: "NoneDicomStudy",
|
|
// column: "TrialId",
|
|
// principalTable: "Trial",
|
|
// principalColumn: "Id",
|
|
// onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_ClinicalForm_SubjectVisit_ReadingId",
|
|
table: "ClinicalForm");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_NoneDicomStudy_Trial_TrialId",
|
|
table: "NoneDicomStudy");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_NoneDicomStudy_TrialId",
|
|
table: "NoneDicomStudy");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_ClinicalForm_ReadingId",
|
|
table: "ClinicalForm");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RandomOrder",
|
|
table: "VisitTask");
|
|
}
|
|
}
|
|
}
|