From f910a2a63cb83b35c6589591400a69c8f7f7917c Mon Sep 17 00:00:00 2001 From: transtrike Date: Sun, 24 Jan 2021 00:07:44 +0200 Subject: Migrations added; CRUD over Posts&Comments successfully completed --- src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs | 10 ++++++---- 1 file changed, 6 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 0727d33..755c274 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -25,13 +25,13 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property("IssuerId") + b.Property("CreatorId") .HasColumnType("uuid"); b.Property("Message") .HasColumnType("text"); - b.Property("PostId") + b.Property("PostId") .HasColumnType("uuid"); b.Property("TimeCreated") @@ -64,7 +64,7 @@ namespace DevHive.Data.Migrations .ValueGeneratedOnAdd() .HasColumnType("uuid"); - b.Property("IssuerId") + b.Property("CreatorId") .HasColumnType("uuid"); b.Property("Message") @@ -351,7 +351,9 @@ namespace DevHive.Data.Migrations { b.HasOne("DevHive.Data.Models.Post", null) .WithMany("Comments") - .HasForeignKey("PostId"); + .HasForeignKey("PostId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("DevHive.Data.Models.User", b => -- cgit v1.2.3