88 lines
2.8 KiB
C#
88 lines
2.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace UniversityDataBaseImplemet.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class fixCustomerStream2 : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Discipline_User_UserId",
|
|
table: "Discipline");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_EducationGroups_User_UserId",
|
|
table: "EducationGroups");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Streams_User_UserId",
|
|
table: "Streams");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Discipline_User_UserId",
|
|
table: "Discipline",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_EducationGroups_User_UserId",
|
|
table: "EducationGroups",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Streams_User_UserId",
|
|
table: "Streams",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Discipline_User_UserId",
|
|
table: "Discipline");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_EducationGroups_User_UserId",
|
|
table: "EducationGroups");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Streams_User_UserId",
|
|
table: "Streams");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Discipline_User_UserId",
|
|
table: "Discipline",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_EducationGroups_User_UserId",
|
|
table: "EducationGroups",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Streams_User_UserId",
|
|
table: "Streams",
|
|
column: "UserId",
|
|
principalTable: "User",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|