Improved compliance monitoring
This commit is contained in:
+2519
File diff suppressed because it is too large
Load Diff
+60
@@ -0,0 +1,60 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddedComplianceStatusAndBeneficiaryLink : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "Status",
|
||||
table: "Outcomes",
|
||||
type: "integer",
|
||||
nullable: false,
|
||||
defaultValueSql: "1");
|
||||
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "BeneficiaryId",
|
||||
table: "ComplianceItems",
|
||||
type: "bigint",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_ComplianceItems_BeneficiaryId",
|
||||
table: "ComplianceItems",
|
||||
column: "BeneficiaryId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_ComplianceItems_Beneficiaries_BeneficiaryId",
|
||||
table: "ComplianceItems",
|
||||
column: "BeneficiaryId",
|
||||
principalTable: "Beneficiaries",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_ComplianceItems_Beneficiaries_BeneficiaryId",
|
||||
table: "ComplianceItems");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_ComplianceItems_BeneficiaryId",
|
||||
table: "ComplianceItems");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Status",
|
||||
table: "Outcomes");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BeneficiaryId",
|
||||
table: "ComplianceItems");
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
@@ -393,6 +393,9 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
|
||||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
|
||||
|
||||
b.Property<long?>("BeneficiaryId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
@@ -430,6 +433,8 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("BeneficiaryId");
|
||||
|
||||
b.HasIndex("CreatedBy");
|
||||
|
||||
b.HasIndex("ProjectId");
|
||||
@@ -1078,6 +1083,11 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
.HasMaxLength(256)
|
||||
.HasColumnType("character varying(256)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("integer")
|
||||
.HasDefaultValueSql("1");
|
||||
|
||||
b.Property<long>("TenantId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
@@ -1786,6 +1796,11 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
|
||||
modelBuilder.Entity("PostFundManagement.Domain.Entities.ComplianceItem", b =>
|
||||
{
|
||||
b.HasOne("PostFundManagement.Domain.Entities.Beneficiary", "Beneficiary")
|
||||
.WithMany()
|
||||
.HasForeignKey("BeneficiaryId")
|
||||
.OnDelete(DeleteBehavior.SetNull);
|
||||
|
||||
b.HasOne("PostFundManagement.Domain.Entities.User", "Creator")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreatedBy")
|
||||
@@ -1809,6 +1824,8 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
|
||||
.HasForeignKey("VerifiedBy")
|
||||
.OnDelete(DeleteBehavior.NoAction);
|
||||
|
||||
b.Navigation("Beneficiary");
|
||||
|
||||
b.Navigation("Creator");
|
||||
|
||||
b.Navigation("Project");
|
||||
|
||||
Reference in New Issue
Block a user