50 lines
1.7 KiB
C#
50 lines
1.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class UpdatetablePlacementProfileaddpositioncandidate : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PositionCandidateId",
|
|
table: "PlacementProfiles",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_PlacementProfiles_PositionCandidateId",
|
|
table: "PlacementProfiles",
|
|
column: "PositionCandidateId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PlacementProfiles_PositionPaths_PositionCandidateId",
|
|
table: "PlacementProfiles",
|
|
column: "PositionCandidateId",
|
|
principalTable: "PositionPaths",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PlacementProfiles_PositionPaths_PositionCandidateId",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_PlacementProfiles_PositionCandidateId",
|
|
table: "PlacementProfiles");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PositionCandidateId",
|
|
table: "PlacementProfiles");
|
|
}
|
|
}
|
|
}
|