Files
pfm/PostFundManagement.Infrastructure/Database/Migrations/20260922033954_RemovedRelationshipsFromAuditLog.cs
T
hermes 11311421ad Removed ValueTask generally where not needed
Removed relationships from audit log
2026-09-22 05:44:25 +02:00

60 lines
1.9 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PostFundManagement.Infrastructure.Database.Migrations
{
/// <inheritdoc />
public partial class RemovedRelationshipsFromAuditLog : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_AuditLogs_Tenants_TenantId",
table: "AuditLogs");
migrationBuilder.DropForeignKey(
name: "FK_AuditLogs_Users_PerformedBy",
table: "AuditLogs");
migrationBuilder.DropIndex(
name: "IX_AuditLogs_PerformedBy",
table: "AuditLogs");
migrationBuilder.DropIndex(
name: "IX_AuditLogs_TenantId",
table: "AuditLogs");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateIndex(
name: "IX_AuditLogs_PerformedBy",
table: "AuditLogs",
column: "PerformedBy");
migrationBuilder.CreateIndex(
name: "IX_AuditLogs_TenantId",
table: "AuditLogs",
column: "TenantId");
migrationBuilder.AddForeignKey(
name: "FK_AuditLogs_Tenants_TenantId",
table: "AuditLogs",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_AuditLogs_Users_PerformedBy",
table: "AuditLogs",
column: "PerformedBy",
principalTable: "Users",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
}
}
}