hrms-api-backend/BMA.EHR.Infrastructure/Migrations/20230829102608_update table placement add avatar.cs

51 lines
1.5 KiB
C#
Raw Normal View History

2023-08-29 17:41:16 +07:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class updatetableplacementaddavatar : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "AvatarId",
table: "PlacementReceives",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
migrationBuilder.CreateIndex(
name: "IX_PlacementReceives_AvatarId",
table: "PlacementReceives",
column: "AvatarId");
migrationBuilder.AddForeignKey(
name: "FK_PlacementReceives_Documents_AvatarId",
table: "PlacementReceives",
column: "AvatarId",
principalTable: "Documents",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_PlacementReceives_Documents_AvatarId",
table: "PlacementReceives");
migrationBuilder.DropIndex(
name: "IX_PlacementReceives_AvatarId",
table: "PlacementReceives");
migrationBuilder.DropColumn(
name: "AvatarId",
table: "PlacementReceives");
}
}
}