From 8b62011960ce88d722c64b72af6837c2e2dbcda5 Mon Sep 17 00:00:00 2001 From: transtrike Date: Fri, 5 Feb 2021 19:02:35 +0200 Subject: Friends relation FUCKING FINALLY FIXED, NIGGA --- .../Migrations/DevHiveContextModelSnapshot.cs | 43 +++------------------- 1 file changed, 6 insertions(+), 37 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 6e0a03a..dc5739c 100644 --- a/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs +++ b/src/DevHive.Data/Migrations/DevHiveContextModelSnapshot.cs @@ -218,6 +218,9 @@ namespace DevHive.Data.Migrations b.Property("TwoFactorEnabled") .HasColumnType("boolean"); + b.Property("UserId") + .HasColumnType("uuid"); + b.Property("UserName") .HasMaxLength(256) .HasColumnType("character varying(256)"); @@ -231,6 +234,8 @@ namespace DevHive.Data.Migrations .IsUnique() .HasDatabaseName("UserNameIndex"); + b.HasIndex("UserId"); + b.HasIndex("UserName") .IsUnique(); @@ -271,21 +276,6 @@ namespace DevHive.Data.Migrations b.ToTable("RatedPosts"); }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserFriend", b => - { - b.Property("UserId") - .HasColumnType("uuid"); - - b.Property("FriendId") - .HasColumnType("uuid"); - - b.HasKey("UserId", "FriendId"); - - b.HasIndex("FriendId"); - - b.ToTable("UserFriends"); - }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserRate", b => { b.Property("Id") @@ -530,25 +520,6 @@ namespace DevHive.Data.Migrations b.Navigation("User"); }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserFriend", b => - { - b.HasOne("DevHive.Data.Models.User", "Friend") - .WithMany("FriendsOf") - .HasForeignKey("FriendId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.HasOne("DevHive.Data.Models.User", "User") - .WithMany("MyFriends") - .HasForeignKey("UserId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - - b.Navigation("Friend"); - - b.Navigation("User"); - }); - modelBuilder.Entity("DevHive.Data.RelationModels.UserRate", b => { b.HasOne("DevHive.Data.Models.Post", "Post") @@ -673,9 +644,7 @@ namespace DevHive.Data.Migrations { b.Navigation("Comments"); - b.Navigation("FriendsOf"); - - b.Navigation("MyFriends"); + b.Navigation("Friends"); b.Navigation("Posts"); -- cgit v1.2.3