irc-netcore-api/IRaCIS.Core.Infra.EFCore/Migrations/20250225060347_nonDicommark.cs

63 lines
2.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class nonDicommark : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ReadingNoneDicomMark",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
VisitTaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StudyId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
NoneDicomFileId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
Path = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
MeasureData = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ReadingNoneDicomMark", x => x.Id);
table.ForeignKey(
name: "FK_ReadingNoneDicomMark_NoneDicomStudy_StudyId",
column: x => x.StudyId,
principalTable: "NoneDicomStudy",
principalColumn: "Id");
table.ForeignKey(
name: "FK_ReadingNoneDicomMark_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "项目阅片 - 非Dicom标记");
migrationBuilder.CreateIndex(
name: "IX_ReadingNoneDicomMark_CreateUserId",
table: "ReadingNoneDicomMark",
column: "CreateUserId");
migrationBuilder.CreateIndex(
name: "IX_ReadingNoneDicomMark_StudyId",
table: "ReadingNoneDicomMark",
column: "StudyId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ReadingNoneDicomMark");
}
}
}