using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updatetablePlacementReciveremoveReceiveUser : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_RetirementDeceasedNotis_Profiles_ReceiveUserId",
                table: "RetirementDeceasedNotis");

            migrationBuilder.DropIndex(
                name: "IX_RetirementDeceasedNotis_ReceiveUserId",
                table: "RetirementDeceasedNotis");

            migrationBuilder.DropColumn(
                name: "ReceiveUserId",
                table: "RetirementDeceasedNotis");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "ReceiveUserId",
                table: "RetirementDeceasedNotis",
                type: "char(36)",
                nullable: false,
                defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "IX_RetirementDeceasedNotis_ReceiveUserId",
                table: "RetirementDeceasedNotis",
                column: "ReceiveUserId");

            migrationBuilder.AddForeignKey(
                name: "FK_RetirementDeceasedNotis_Profiles_ReceiveUserId",
                table: "RetirementDeceasedNotis",
                column: "ReceiveUserId",
                principalTable: "Profiles",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
    }
}
