Fix Content's Creator relationship

This commit is contained in:
2025-04-15 04:08:40 -04:00
parent a332b1082d
commit fffb41249e
5 changed files with 475 additions and 4 deletions

View File

@@ -37,6 +37,9 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b.Property<Guid>("CreatedBy")
.HasColumnType("uuid");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid");
b.Property<DateTimeOffset?>("DeletedAt")
.HasColumnType("timestamp with time zone");
@@ -66,7 +69,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
b.HasKey("Id");
b.HasIndex("CreatedBy");
b.HasIndex("CreatorId");
b.ToTable("Contents", "Content");
});
@@ -161,7 +164,7 @@ namespace Hutopy.Web.Features.Contents.Data.Migrations
{
b.HasOne("Hutopy.Web.Features.Contents.Data.Creator", "Creator")
.WithMany()
.HasForeignKey("CreatedBy");
.HasForeignKey("CreatorId");
b.OwnsMany("Hutopy.Web.Features.Contents.Data.ContentReaction", "Reactions", b1 =>
{