using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace PostFundManagement.Infrastructure.Database.Migrations
{
///
public partial class AddedTenantIdToOutcomes : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn(
name: "TenantId",
table: "Outcomes",
type: "bigint",
nullable: false,
defaultValue: 0L);
migrationBuilder.CreateIndex(
name: "IX_Outcomes_TenantId",
table: "Outcomes",
column: "TenantId");
migrationBuilder.AddForeignKey(
name: "FK_Outcomes_Tenants_TenantId",
table: "Outcomes",
column: "TenantId",
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Outcomes_Tenants_TenantId",
table: "Outcomes");
migrationBuilder.DropIndex(
name: "IX_Outcomes_TenantId",
table: "Outcomes");
migrationBuilder.DropColumn(
name: "TenantId",
table: "Outcomes");
}
}
}