From 3cd6c8732f421dfa31cca7e7d624589f1ebdd28d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 5 Feb 2021 17:48:33 +0200 Subject: Added post file attachments migration --- .../Migrations/DevHiveContextModelSnapshot.cs | 34 +++++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) (limited to 'src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs') diff --git a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs index d675914..6e0a03a 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -1,6 +1,5 @@ // using System; -using System.Collections.Generic; using DevHive.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; @@ -70,9 +69,6 @@ namespace DevHive.Data.Migrations b.Property("CreatorId") .HasColumnType("uuid"); - b.Property>("FileUrls") - .HasColumnType("text[]"); - b.Property("Message") .HasColumnType("text"); @@ -241,6 +237,25 @@ namespace DevHive.Data.Migrations b.ToTable("AspNetUsers"); }); + modelBuilder.Entity("DevHive.Data.RelationModels.PostAttachments", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("uuid"); + + b.Property("FileUrl") + .HasColumnType("text"); + + b.Property("PostId") + .HasColumnType("uuid"); + + b.HasKey("Id"); + + b.HasIndex("PostId"); + + b.ToTable("PostAttachments"); + }); + modelBuilder.Entity("DevHive.Data.RelationModels.RatedPost", b => { b.Property("UserId") @@ -487,6 +502,15 @@ namespace DevHive.Data.Migrations b.Navigation("Post"); }); + modelBuilder.Entity("DevHive.Data.RelationModels.PostAttachments", b => + { + b.HasOne("DevHive.Data.Models.Post", "Post") + .WithMany("Attachments") + .HasForeignKey("PostId"); + + b.Navigation("Post"); + }); + modelBuilder.Entity("DevHive.Data.RelationModels.RatedPost", b => { b.HasOne("DevHive.Data.Models.Post", "Post") @@ -638,6 +662,8 @@ namespace DevHive.Data.Migrations modelBuilder.Entity("DevHive.Data.Models.Post", b => { + b.Navigation("Attachments"); + b.Navigation("Comments"); b.Navigation("Rating"); -- cgit v1.2.3