42 lines
1.3 KiB
C#
42 lines
1.3 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace AccountMangement.Infrastructure.EFCore.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class setOnDeleteToCascadeInTaskTableWithAssign : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Assigns_TasksManager_TaskId",
|
|
table: "Assigns");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Assigns_TasksManager_TaskId",
|
|
table: "Assigns",
|
|
column: "TaskId",
|
|
principalTable: "TasksManager",
|
|
principalColumn: "id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_Assigns_TasksManager_TaskId",
|
|
table: "Assigns");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_Assigns_TasksManager_TaskId",
|
|
table: "Assigns",
|
|
column: "TaskId",
|
|
principalTable: "TasksManager",
|
|
principalColumn: "id");
|
|
}
|
|
}
|
|
}
|