60 lines
1.9 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|