irc-netcore-api/IRaCIS.Core.Infra.EFCore/Migrations/20250822030004_cmoveadd.cs

53 lines
2.2 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
/// <inheritdoc />
public partial class cmoveadd : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CmoveStudy",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
StudyInstanceUIDList = table.Column<string>(type: "nvarchar(max)", nullable: false),
CallingAE = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
CalledAE = table.Column<string>(type: "nvarchar(400)", maxLength: 400, nullable: false),
HopitalGroupIdList = table.Column<string>(type: "nvarchar(max)", nullable: false),
CreateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CmoveStudy", x => x.Id);
table.ForeignKey(
name: "FK_CmoveStudy_User_CreateUserId",
column: x => x.CreateUserId,
principalTable: "User",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_CmoveStudy_CreateUserId",
table: "CmoveStudy",
column: "CreateUserId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CmoveStudy");
}
}
}