Migrated portfolio to be linked to the organisation

This commit is contained in:
2026-09-05 10:57:10 +02:00
parent a218b19875
commit e274c33592
6 changed files with 2053 additions and 0 deletions
@@ -1006,6 +1006,9 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<long>("OrganisationId")
.HasColumnType("bigint");
b.Property<Guid>("OwnedBy")
.HasColumnType("uuid");
@@ -1013,6 +1016,8 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
b.HasIndex("CreatedBy");
b.HasIndex("OrganisationId");
b.HasIndex("OwnedBy");
b.ToTable("Portfolios", (string)null);
@@ -1799,6 +1804,12 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
.OnDelete(DeleteBehavior.NoAction)
.IsRequired();
b.HasOne("PostFundManagement.Domain.Entities.Organisation", "Organisation")
.WithMany()
.HasForeignKey("OrganisationId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("PostFundManagement.Domain.Entities.User", "Owner")
.WithMany()
.HasForeignKey("OwnedBy")
@@ -1807,6 +1818,8 @@ namespace PostFundManagement.Infrastructure.Database.Migrations
b.Navigation("Creator");
b.Navigation("Organisation");
b.Navigation("Owner");
});