hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230913163953_update table retirementperiod add Documentforward.cs

50 lines
1.6 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableretirementperiodaddDocumentforward : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "DocumentForwardId",
table: "RetirementDeceaseds",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.CreateIndex(
name: "IX_RetirementDeceaseds_DocumentForwardId",
table: "RetirementDeceaseds",
column: "DocumentForwardId");
migrationBuilder.AddForeignKey(
name: "FK_RetirementDeceaseds_Documents_DocumentForwardId",
table: "RetirementDeceaseds",
column: "DocumentForwardId",
principalTable: "Documents",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_RetirementDeceaseds_Documents_DocumentForwardId",
table: "RetirementDeceaseds");
migrationBuilder.DropIndex(
name: "IX_RetirementDeceaseds_DocumentForwardId",
table: "RetirementDeceaseds");
migrationBuilder.DropColumn(
name: "DocumentForwardId",
table: "RetirementDeceaseds");
}
}
}