50 lines
1.5 KiB
C#
50 lines
1.5 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace BMA.EHR.Recurit.Exam.Service.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class addtablecandidateDoc : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<Guid>(
|
|
name: "PaymentImgId",
|
|
table: "Candidates",
|
|
type: "char(36)",
|
|
nullable: true,
|
|
collation: "ascii_general_ci");
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Candidates_PaymentImgId",
|
|
table: "Candidates",
|
|
column: "PaymentImgId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Candidates_Documents_PaymentImgId",
|
|
table: "Candidates",
|
|
column: "PaymentImgId",
|
|
principalTable: "Documents",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Candidates_Documents_PaymentImgId",
|
|
table: "Candidates");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Candidates_PaymentImgId",
|
|
table: "Candidates");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "PaymentImgId",
|
|
table: "Candidates");
|
|
}
|
|
}
|
|
}
|