final
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-05-20 01:36:54 +02:00
parent beab15a7ef
commit 10c1bb008f
19 changed files with 1632 additions and 19 deletions

View File

@@ -0,0 +1,61 @@
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);
}
}
}