Torma Kristóf
10c1bb008f
All checks were successful
continuous-integration/drone/push Build is passing
62 lines
2.2 KiB
C#
62 lines
2.2 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
namespace HanyadikHetVan.Data.Migrations
|
|
{
|
|
public partial class ChangeCascadeBehavior : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_FunFacts_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "FunFacts");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Pauses_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "Pauses");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_FunFacts_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "FunFacts",
|
|
column: "WeeklyTimeSpanId",
|
|
principalTable: "WeeklyTimeSpans",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Pauses_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "Pauses",
|
|
column: "WeeklyTimeSpanId",
|
|
principalTable: "WeeklyTimeSpans",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Restrict);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_FunFacts_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "FunFacts");
|
|
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Pauses_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "Pauses");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_FunFacts_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "FunFacts",
|
|
column: "WeeklyTimeSpanId",
|
|
principalTable: "WeeklyTimeSpans",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Pauses_WeeklyTimeSpans_WeeklyTimeSpanId",
|
|
table: "Pauses",
|
|
column: "WeeklyTimeSpanId",
|
|
principalTable: "WeeklyTimeSpans",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|