fix: add missing FK migration for EmailChannelUsage -> EmailChannel
- EF model had a pending HasOne/WithMany relationship not in migrations - Adds FK_email_channel_usage_email_channels_provider_id with cascade delete Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace HrynCo.NotificationService.DAL.EF.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class PendingChanges : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_email_channel_usage_email_channels_provider_id",
|
||||
table: "email_channel_usage",
|
||||
column: "provider_id",
|
||||
principalTable: "email_channels",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_email_channel_usage_email_channels_provider_id",
|
||||
table: "email_channel_usage");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user