45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DocuMed.Repository.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class editMH : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_MedicalHistories_SectionId",
|
|
schema: "public",
|
|
table: "MedicalHistories",
|
|
column: "SectionId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_MedicalHistories_Sections_SectionId",
|
|
schema: "public",
|
|
table: "MedicalHistories",
|
|
column: "SectionId",
|
|
principalSchema: "public",
|
|
principalTable: "Sections",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_MedicalHistories_Sections_SectionId",
|
|
schema: "public",
|
|
table: "MedicalHistories");
|
|
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_MedicalHistories_SectionId",
|
|
schema: "public",
|
|
table: "MedicalHistories");
|
|
}
|
|
}
|
|
}
|