55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddTrialMaxCode : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "MaxDicomCode",
|
|
table: "Trial",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "最大的Dicom检查编号 整型");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "MaxNoneDicomCode",
|
|
table: "Trial",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0,
|
|
comment: "最大的NoneDicom检查编号 整型");
|
|
|
|
//migrationBuilder.AddForeignKey(
|
|
// name: "FK_Segmentation_VisitTask_VisitTaskId",
|
|
// table: "Segmentation",
|
|
// column: "VisitTaskId",
|
|
// principalTable: "VisitTask",
|
|
// principalColumn: "Id",
|
|
// onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Segmentation_VisitTask_VisitTaskId",
|
|
table: "Segmentation");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MaxDicomCode",
|
|
table: "Trial");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "MaxNoneDicomCode",
|
|
table: "Trial");
|
|
}
|
|
}
|
|
}
|