using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
    /// 
    public partial class DownloadAddTrialSiteCode : Migration
    {
        /// 
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn(
                name: "TrialSiteCode",
                table: "TrialImageDownload",
                type: "nvarchar(400)",
                maxLength: 400,
                nullable: false,
                defaultValue: "",
                comment: "一致性分析的就显示一致性分析的中心");
            migrationBuilder.CreateIndex(
                name: "IX_TrialImageDownload_SubjectId",
                table: "TrialImageDownload",
                column: "SubjectId");
            migrationBuilder.AddForeignKey(
                name: "FK_TrialImageDownload_Subject_SubjectId",
                table: "TrialImageDownload",
                column: "SubjectId",
                principalTable: "Subject",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
        /// 
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_TrialImageDownload_Subject_SubjectId",
                table: "TrialImageDownload");
            migrationBuilder.DropIndex(
                name: "IX_TrialImageDownload_SubjectId",
                table: "TrialImageDownload");
            migrationBuilder.DropColumn(
                name: "TrialSiteCode",
                table: "TrialImageDownload");
        }
    }
}