hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230907030700_update table placementprofile add image.cs

51 lines
1.6 KiB
C#
Raw Normal View History

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