65 lines
2.1 KiB
C#
65 lines
2.1 KiB
C#
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|||
|
#nullable disable
|
|||
|
|
|||
|
namespace UniversityDataBaseImplemet.Migrations
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
public partial class nullableEdStatusId5 : Migration
|
|||
|
{
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_EducationStatuses_User_UserId",
|
|||
|
table: "EducationStatuses");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Students_User_UserId",
|
|||
|
table: "Students");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_EducationStatuses_User_UserId",
|
|||
|
table: "EducationStatuses",
|
|||
|
column: "UserId",
|
|||
|
principalTable: "User",
|
|||
|
principalColumn: "Id");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Students_User_UserId",
|
|||
|
table: "Students",
|
|||
|
column: "UserId",
|
|||
|
principalTable: "User",
|
|||
|
principalColumn: "Id");
|
|||
|
}
|
|||
|
|
|||
|
/// <inheritdoc />
|
|||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
{
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_EducationStatuses_User_UserId",
|
|||
|
table: "EducationStatuses");
|
|||
|
|
|||
|
migrationBuilder.DropForeignKey(
|
|||
|
name: "FK_Students_User_UserId",
|
|||
|
table: "Students");
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_EducationStatuses_User_UserId",
|
|||
|
table: "EducationStatuses",
|
|||
|
column: "UserId",
|
|||
|
principalTable: "User",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
|
|||
|
migrationBuilder.AddForeignKey(
|
|||
|
name: "FK_Students_User_UserId",
|
|||
|
table: "Students",
|
|||
|
column: "UserId",
|
|||
|
principalTable: "User",
|
|||
|
principalColumn: "Id",
|
|||
|
onDelete: ReferentialAction.Cascade);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|