using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BMA.EHR.Infrastructure.Migrations
{
    /// <inheritdoc />
    public partial class updatetableretirementperiodaddDocument : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<Guid>(
                name: "DocumentId",
                table: "RetirementDeceasedNotis",
                type: "char(36)",
                nullable: true,
                collation: "ascii_general_ci");

            migrationBuilder.CreateIndex(
                name: "IX_RetirementDeceasedNotis_DocumentId",
                table: "RetirementDeceasedNotis",
                column: "DocumentId");

            migrationBuilder.AddForeignKey(
                name: "FK_RetirementDeceasedNotis_Documents_DocumentId",
                table: "RetirementDeceasedNotis",
                column: "DocumentId",
                principalTable: "Documents",
                principalColumn: "Id");
        }

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

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

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