using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace IRaCIS.Core.Infra.EFCore.Migrations
{
    /// <inheritdoc />
    public partial class addTrialChart : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "IsExternalViewTrialChart",
                table: "Trial",
                type: "bit",
                nullable: false,
                defaultValue: false,
                comment: "外部人员 查看项目报表");

            //migrationBuilder.CreateIndex(
            //    name: "IX_DicomInstance_TrialId",
            //    table: "DicomInstance",
            //    column: "TrialId");

            //migrationBuilder.AddForeignKey(
            //    name: "FK_DicomInstance_Trial_TrialId",
            //    table: "DicomInstance",
            //    column: "TrialId",
            //    principalTable: "Trial",
            //    principalColumn: "Id",
            //    onDelete: ReferentialAction.Cascade);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_DicomInstance_Trial_TrialId",
                table: "DicomInstance");

            migrationBuilder.DropIndex(
                name: "IX_DicomInstance_TrialId",
                table: "DicomInstance");

            migrationBuilder.DropColumn(
                name: "IsExternalViewTrialChart",
                table: "Trial");
        }
    }
}
